<!DOCTYPE html>

<html class="theme-next mist use-motion" lang="zh-Hans">

<head>
  <!-- hexo-inject:begin --><!-- hexo-inject:end --><meta name="generator" content="Hexo 3.9.0">
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport"
                                                                                  content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="theme-color" content="#222">

  <link rel="stylesheet" href="/lib/needsharebutton/needsharebutton.css">

  <script src="/lib/pace/pace.min.js?v=1.0.2"></script>
  <link href="/lib/pace/pace-theme-minimal.min.css?v=1.0.2" rel="stylesheet">

  <meta http-equiv="Cache-Control" content="no-transform">
  <meta http-equiv="Cache-Control" content="no-siteapp">

  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet"
                                                                                  type="text/css">

  <link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet"
                                                                                  type="text/css">

  <link href="/css/main.css?v=6.0.1" rel="stylesheet" type="text/css">

  <link rel="icon" type="image/png" sizes="16x16"
                                                                                  href="/images/favicon.ico?v=6.0.1">

  <script type="text/javascript" id="hexo.configurations">
    var NexT = window.NexT || {};
    var CONFIG = {
      root: '/',
      scheme: 'Mist',
      version: '6.0.1',
      sidebar: {
        "position": "left",
        "display": "post",
        "offset": 12,
        "b2t": true,
        "scrollpercent": true,
        "onmobile": true
      },
      fancybox: true,
      fastclick: false,
      lazyload: true,
      tabs: true,
      motion: {
        "enable": true,
        "async": false,
        "transition": {
          "post_block": "fadeIn",
          "post_header": "slideDownIn",
          "post_body": "slideDownIn",
          "coll_header": "slideLeftIn",
          "sidebar": "slideUpIn"
        }
      },
      algolia: {
        applicationID: '',
        apiKey: '',
        indexName: '',
        hits: {
          "per_page": 10
        },
        labels: {
          "input_placeholder": "Search for Posts",
          "hits_empty": "We didn't find any results for the search: ${query}",
          "hits_stats": "${hits} results found in ${time} ms"
        }
      }
    };

  </script>

  <link rel="stylesheet" href="mermaid.min.css">
  <script src="https://unpkg.com/mermaid@7.1.0/dist/mermaid.min.js"></script>

  <meta name="keywords"
                                                                                  content="Hexo,NexT,Github Pages,Coding Pages,Gitee Pages,Travis,">

  <meta name="keywords"
                                                                                  content="Hexo,NexT,Github Pages,Coding Pages,Gitee Pages,Travis">
  <meta property="og:type" content="article">
  <meta property="og:title"
                                                                                  content="Hexo+NexT+GithubPages+CodingPages+GiteePages+Travis全攻略">
  <meta property="og:url"
                                                                                  content="https://tankeryang.github.io/posts/Hexo + NexT + Github Pages + Coding Pages + Gitee Pages + Travis 全攻略/index.html">
  <meta property="og:site_name" content="淦">
  <meta property="og:locale" content="zh-Hans">
  <meta property="og:image"
                                                                                  content="https://tankeryang.github.io/posts/Hexo%20+%20NexT%20+%20Github%20Pages%20+%20Coding%20Pages%20+%20Gitee%20Pages%20+%20Travis%20全攻略/pic1.png">
  <meta property="og:image"
                                                                                  content="https://tankeryang.github.io/posts/Hexo%20+%20NexT%20+%20Github%20Pages%20+%20Coding%20Pages%20+%20Gitee%20Pages%20+%20Travis%20全攻略/pic2.png">
  <meta property="og:image"
                                                                                  content="https://tankeryang.github.io/posts/Hexo%20+%20NexT%20+%20Github%20Pages%20+%20Coding%20Pages%20+%20Gitee%20Pages%20+%20Travis%20全攻略/pic3.png">
  <meta property="og:image"
                                                                                  content="https://tankeryang.github.io/posts/Hexo%20+%20NexT%20+%20Github%20Pages%20+%20Coding%20Pages%20+%20Gitee%20Pages%20+%20Travis%20全攻略/pic4.png">
  <meta property="og:image"
                                                                                  content="https://tankeryang.github.io/posts/Hexo%20+%20NexT%20+%20Github%20Pages%20+%20Coding%20Pages%20+%20Gitee%20Pages%20+%20Travis%20全攻略/pic5.png">
  <meta property="og:image"
                                                                                  content="https://tankeryang.github.io/posts/Hexo%20+%20NexT%20+%20Github%20Pages%20+%20Coding%20Pages%20+%20Gitee%20Pages%20+%20Travis%20全攻略/pic6.png">
  <meta property="og:image"
                                                                                  content="https://tankeryang.github.io/posts/Hexo%20+%20NexT%20+%20Github%20Pages%20+%20Coding%20Pages%20+%20Gitee%20Pages%20+%20Travis%20全攻略/pic7.png">
  <meta property="og:image"
                                                                                  content="https://tankeryang.github.io/posts/Hexo%20+%20NexT%20+%20Github%20Pages%20+%20Coding%20Pages%20+%20Gitee%20Pages%20+%20Travis%20全攻略/pic8.jpeg">
  <meta property="og:updated_time" content="2019-10-09T17:06:09.547Z">
  <meta name="twitter:card" content="summary">
  <meta name="twitter:title"
                                                                                  content="Hexo+NexT+GithubPages+CodingPages+GiteePages+Travis全攻略">
  <meta name="twitter:image"
                                                                                  content="https://tankeryang.github.io/posts/Hexo%20+%20NexT%20+%20Github%20Pages%20+%20Coding%20Pages%20+%20Gitee%20Pages%20+%20Travis%20全攻略/pic1.png">

  <title>Hexo+NexT+GithubPages+CodingPages+GiteePages+Travis全攻略 | 淦</title>

  <noscript>
    <style type="text/css">
      .use-motion .motion-element,
      .use-motion .brand,
      .use-motion .menu-item,
      .sidebar-inner,
      .use-motion .post-block,
      .use-motion .pagination,
      .use-motion .comments,
      .use-motion .post-header,
      .use-motion .post-body,
      .use-motion .collection-title {
        opacity: initial;
      }

      .use-motion .logo,
      .use-motion .site-title,
      .use-motion .site-subtitle {
        opacity: initial;
        top: initial;
      }

      .use-motion {
        .logo-line-before i {
          left: initial;
        }

        .logo-line-after i {
          right: initial;
        }
      }

    </style>
  </noscript><!-- hexo-inject:begin --><!-- hexo-inject:end -->

</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  <!-- hexo-inject:begin --><!-- hexo-inject:end --><div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>

    <header id="header" class="header" itemscope
                                                                                    itemtype="http://schema.org/WPHeader">
      <div class="header-inner">
        <div class="site-brand-wrapper">
          <div class="site-meta ">

            <div class="custom-logo-site-title">
              <a href="/" class="brand" rel="start">
                <span class="logo-line-before"><i></i></span>
                <span class="site-title">淦</span>
                <span class="logo-line-after"><i></i></span>
              </a>
            </div>

            <p class="site-subtitle">n*m*lg(b)</p>

          </div>

          <div class="site-nav-toggle">
            <button>
              <span class="btn-bar"></span>
              <span class="btn-bar"></span>
              <span class="btn-bar"></span>
            </button>
          </div>
        </div>

        <nav class="site-nav">

          <ul id="menu" class="menu">

            <li class="menu-item menu-item-home">
              <a href="/" rel="section">
                <i class="menu-item-icon fa fa-fw fa-home"></i> <br>home</a>
            </li>

            <li class="menu-item menu-item-archives">
              <a href="/archives/" rel="section">
                <i class="menu-item-icon fa fa-fw fa-archive"></i>
                <br>archives<span class="badge">16</span>
              </a>
            </li>

            <li class="menu-item menu-item-ml-note">
              <a href="/MachineLearningNote" rel="section">
                <i class="menu-item-icon fa fa-fw fa-book"></i> <br>ML Note</a>
            </li>

            <li class="menu-item menu-item-about">
              <a href="/about/" rel="section">
                <i class="menu-item-icon fa fa-fw fa-user"></i> <br>about</a>
            </li>

            <li class="menu-item menu-item-search">

              <a href="javascript:;" class="popup-trigger">

                <i class="menu-item-icon fa fa-search fa-fw"></i> <br>search</a>
            </li>

          </ul>

          <div class="site-search">

            <div class="popup search-popup local-search-popup">
              <div class="local-search-header clearfix">
                <span class="search-icon">
                  <i class="fa fa-search"></i>
                </span>
                <span class="popup-btn-close">
                  <i class="fa fa-times-circle"></i>
                </span>
                <div class="local-search-input-wrapper">
                  <input autocomplete="off" placeholder="searching..." spellcheck="false" type="text"
                                                                                                  id="local-search-input">
                </div>
              </div>
              <div id="local-search-result"></div>
            </div>

          </div>

        </nav>
      </div>
    </header>

    <a href="https://github.com/tankeryang" class="github-corner" target="_blank" title="Follow me on GitHub"
                                                                                    aria-label="Follow me on GitHub"><svg
                                                                                      width="80"
                                                                                      height="80"
                                                                                      viewbox="0 0 250 250"
                                                                                      style="fill:#222; color:#fff; position: absolute; top: 0; border: 0; right: 0;"
                                                                                      aria-hidden="true">
        <path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z" />
        <path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2"
                                                                                        fill="currentColor"
                                                                                        style="transform-origin: 130px 106px;"
                                                                                        class="octo-arm" />
        <path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z"
                                                                                        fill="currentColor"
                                                                                        class="octo-body" />
        </svg></a>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">

            <div id="posts" class="posts-expand">

              <div class="reading-progress-bar"></div>

              <article class="post post-type-normal" itemscope
                                                                                              itemtype="http://schema.org/Article">

                <div class="post-block">
                  <link itemprop="mainEntityOfPage"
                                                                                                  href="https://tankeryang.github.io/posts/Hexo + NexT + Github Pages + Coding Pages + Gitee Pages + Travis 全攻略/">

                  <span hidden itemprop="author" itemscope
                                                                                                  itemtype="http://schema.org/Person">
                    <meta itemprop="name" content="tankeryang">
                    <meta itemprop="description" content>
                    <meta itemprop="image" content="/uploads/girl.jpeg">
                  </span>

                  <span hidden itemprop="publisher" itemscope
                                                                                                  itemtype="http://schema.org/Organization">
                    <meta itemprop="name" content="淦">
                  </span>

                  <header class="post-header">

                    <h1 class="post-title" itemprop="name headline">
                      Hexo+NexT+GithubPages+CodingPages+GiteePages+Travis全攻略
                    </h1>

                    <div class="post-meta">
                      <span class="post-time">

                        <span class="post-meta-item-icon">
                          <i class="fa fa-calendar-o"></i>
                        </span>

                        <span class="post-meta-item-text">posted on</span>

                        <time title="创建于" itemprop="dateCreated datePublished"
                                                                                                        datetime="2018-01-22T15:34:54+00:00">2018-01-22</time>

                      </span>

                      <span class="post-category">

                        <span class="post-meta-divider">|</span>

                        <span class="post-meta-item-icon">
                          <i class="fa fa-folder-o"></i>
                        </span>

                        <span class="post-meta-item-text">in</span>

                        <span itemprop="about" itemscope
                                                                                                        itemtype="http://schema.org/Thing"><a
                                                                                                          href="/categories/技术杂项/"
                                                                                                          itemprop="url"
                                                                                                          rel="index"><span
                                                                                                            itemprop="name">技术杂项</span></a></span>

                      </span>

                      <span class="post-comments-count">
                        <span class="post-meta-divider">|</span>
                        <span class="post-meta-item-icon">
                          <i class="fa fa-comment-o"></i>
                        </span>
                        <a href="/posts/Hexo + NexT + Github Pages + Coding Pages + Gitee Pages + Travis 全攻略/#comments"
                                                                                                        itemprop="discussionUrl">
                          <span class="post-comments-count valine-comment-count" data-xid="/posts/Hexo + NexT + Github Pages + Coding Pages + Gitee Pages + Travis 全攻略/"
                                                                                                          itemprop="commentCount"></span>
                        </a>
                      </span>

                      <span id="/posts/Hexo + NexT + Github Pages + Coding Pages + Gitee Pages + Travis 全攻略/"
                                                                                                      class="leancloud_visitors"
                                                                                                      data-flag-title="Hexo+NexT+GithubPages+CodingPages+GiteePages+Travis全攻略">
                        <span class="post-meta-divider">|</span>
                        <span class="post-meta-item-icon">
                          <i class="fa fa-eye"></i>
                        </span>

                        <span class="post-meta-item-text">read times&#58;</span>

                        <span class="leancloud-visitors-count"></span>
                      </span>

                      <div class="post-wordcount">

                        <span class="post-meta-item-icon">
                          <i class="fa fa-file-word-o"></i>
                        </span>

                        <span class="post-meta-item-text">words
                          count&#58;</span>

                        <span title="words count">36k</span>

                        <span class="post-meta-divider">|</span>

                        <span class="post-meta-item-icon">
                          <i class="fa fa-clock-o"></i>
                        </span>

                        <span class="post-meta-item-text">minutes to read
                          &asymp;</span>

                        <span title="minutes to read">1:19</span>

                      </div>

                    </div>
                  </header>

                  <div class="post-body" itemprop="articleBody">

                    <img
                                                                                                    src="/posts/Hexo%20+%20NexT%20+%20Github%20Pages%20+%20Coding%20Pages%20+%20Gitee%20Pages%20+%20Travis%20全攻略/pic1.png">
                    <a id="more"></a>
                    <p>
                      这几天刚更新了NexT主题，一直在修改细节，终于从5.1.x的版本更新到了6.0.x的版本，nodeJS和NPM也做了更新。本着
                      <strong>互联网共享精神</strong>，我在这里将
                      <strong>如何搭建Hexo+NexT博客和如何规范化写作+构建+push的流程</strong>
                      做详细整理。<br>本人目前常用
                      <strong>Mac</strong>。以下配置对于 <strong>Windows，Linux</strong>
                      自行参考。</p>
                    <h1 id="安装Hexo"><a href="#安装Hexo" class="headerlink"
                                                                                                      title="安装Hexo"></a>安装Hexo
                    </h1>
                    <h2 id="安装node-js"><a href="#安装node-js" class="headerlink"
                                                                                                      title="安装node.js"></a>安装node.js
                    </h2>
                    <div class="note success">
                      <p>如果你已经安装了node.js，请忽略。</p>
                    </div>
                    <p>访问<a href="https://nodejs.org/en/" target="_blank"
                                                                                                      rel="noopener">node.js官网</a>，根据指引进行安装。
                    </p>
                    <h2 id="安装Git"><a href="#安装Git" class="headerlink"
                                                                                                      title="安装Git"></a>安装Git
                    </h2>
                    <div class="note success">
                      <p>如果你已经安装了Git，请忽略。</p>
                    </div>
                    <p>访问<a href="https://git-scm.com/" target="_blank"
                                                                                                      rel="noopener">Git官网</a>，根据指引进行安装。
                    </p>
                    <div class="note warning">
                      <p>由于众所周知的原因，Windows从上面的链接下载git for
                        windows最好挂上一个代理，否则下载速度十分缓慢。也可以参考<a href="https://github.com/waylau/git-for-win" target="_blank"
                                                                                                        rel="noopener">这个页面</a>，收录了存储于百度云的下载地址。
                      </p>
                    </div>
                    <h2 id="安装Hexo-1"><a href="#安装Hexo-1" class="headerlink"
                                                                                                      title="安装Hexo"></a>安装Hexo
                    </h2>
                    <ul>
                      <li>
                        <p>
                          <strong>国内的朋友</strong>，因为众所周知的原因，从npm直接安装hexo会非常慢，所以你需要用到<a href="https://npm.taobao.org/"
                                                                                                          target="_blank"
                                                                                                          rel="noopener"><strong>镜像源</strong></a>，参考上面的步骤，使用cnpm命令行工具代替默认的npm:
                          在windows控制台（cmd）里输入并执行<code>npm install -g cnpm
                            --registry=https://registry.npm.taobao.org</code>，然后安装hexo:
                          <code>cnpm
                            install -g hexo-cli</code></p>
                      </li>
                      <li>
                        <p><strong>国外的朋友</strong>，请直接打开windows控制台，输入<code>npm
                            install -g
                            hexo-cli</code>并执行。</p>
                      </li>
                    </ul>
                    <hr>
                    <h1 id="建站"><a href="#建站" class="headerlink"
                                                                                                      title="建站"></a>建站
                    </h1>
                    <h2 id="建立本地博客文件夹"><a href="#建立本地博客文件夹" class="headerlink"
                                                                                                      title="建立本地博客文件夹"></a>建立本地博客文件夹
                    </h2>
                    <p>在命令行执行如下命令，其中<code>&lt;folder&gt;</code>为文件夹路径<br>
                      <figure class="highlight bash">
                        <table>
                          <tr>
                            <td class="gutter">
                              <pre><span class="line">1</span><br><span class="line">2</span><br></pre>
                            </td>
                            <td class="code">
                              <pre><span class="line">hexo init &lt;folder&gt;</span><br><span class="line"><span class="built_in">cd</span> &lt;folder&gt;</span><br></pre>
                            </td>
                          </tr>
                        </table>
                      </figure>
                    </p>
                    <p>示例<br>
                      <figure class="highlight bash">
                        <table>
                          <tr>
                            <td class="gutter">
                              <pre><span class="line">1</span><br><span class="line">2</span><br></pre>
                            </td>
                            <td class="code">
                              <pre><span class="line">hexo init C:/hexo/myblog</span><br><span class="line"><span class="built_in">cd</span> C:/hexo/myblog</span><br></pre>
                            </td>
                          </tr>
                        </table>
                      </figure>
                    </p>
                    <div class="note warning">
                      <p>以下步骤均采用这个路径作为说明，并且
                        <strong>所有有关<code>hexo</code>的命令</strong> 均要在此路径下执行。</p>
                    </div>
                    <p>建立好后文件夹目录如下<br>
                      <figure class="highlight plain">
                        <table>
                          <tr>
                            <td class="gutter">
                              <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre>
                            </td>
                            <td class="code">
                              <pre><span class="line">.</span><br><span class="line">├── _config.yml</span><br><span class="line">├── package.json</span><br><span class="line">├── .gitignore</span><br><span class="line">├── node_modules</span><br><span class="line">├── scaffolds</span><br><span class="line">├── source</span><br><span class="line">|   ├── _posts</span><br><span class="line">└── themes</span><br></pre>
                            </td>
                          </tr>
                        </table>
                      </figure>
                    </p>
                    <p>其中</p>
                    <ul>
                      <li><code>_config.yml</code>：博客的配置文件，可以在此配置大部分的参数。</li>
                      <li><code>package.json</code>：应用程序的信息。EJS, Stylus和Markdown
                        renderer
                        已默认安装，您可以自由移除。<figure class="highlight json">
                          <figcaption><span>package.json</span></figcaption>
                          <table>
                            <tr>
                              <td class="gutter">
                                <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br></pre>
                              </td>
                              <td class="code">
                                <pre><span class="line">&#123;</span><br><span class="line">  <span class="attr">"name"</span>: <span class="string">"hexo-site"</span>,</span><br><span class="line">  <span class="attr">"version"</span>: <span class="string">"0.0.0"</span>,</span><br><span class="line">  <span class="attr">"private"</span>: <span class="literal">true</span>,</span><br><span class="line">  <span class="attr">"hexo"</span>: &#123;</span><br><span class="line">    <span class="attr">"version"</span>: <span class="string">""</span></span><br><span class="line">  &#125;,</span><br><span class="line">  <span class="attr">"dependencies"</span>: &#123;</span><br><span class="line">    <span class="attr">"hexo"</span>: <span class="string">"^3.2.0"</span>,</span><br><span class="line">    <span class="attr">"hexo-generator-archive"</span>: <span class="string">"^0.1.4"</span>,</span><br><span class="line">    <span class="attr">"hexo-generator-category"</span>: <span class="string">"^0.1.3"</span>,</span><br><span class="line">    <span class="attr">"hexo-generator-index"</span>: <span class="string">"^0.2.0"</span>,</span><br><span class="line">    <span class="attr">"hexo-generator-tag"</span>: <span class="string">"^0.2.0"</span>,</span><br><span class="line">    <span class="attr">"hexo-renderer-ejs"</span>: <span class="string">"^0.3.0"</span>,</span><br><span class="line">    <span class="attr">"hexo-renderer-stylus"</span>: <span class="string">"^0.3.1"</span>,</span><br><span class="line">    <span class="attr">"hexo-renderer-marked"</span>: <span class="string">"^0.3.0"</span>,</span><br><span class="line">    <span class="attr">"hexo-server"</span>: <span class="string">"^0.2.0"</span></span><br><span class="line">  &#125;</span><br><span class="line">&#125;</span><br></pre>
                              </td>
                            </tr>
                          </table>
                        </figure>
                      </li>
                      <li>scaffolds：模板文件夹，当您新建文章时，Hexo会根据scaffold来建立文件。</li>
                      <li>source：资源文件夹，存放用户资源的地方。除<code>_posts</code>文件夹之外，开头命名为
                        _
                        (下划线)的文件/文件夹和隐藏的文件将会被忽略。Markdown和HTML 文件会被解析并放到 public
                        文件夹，而其他文件会被拷贝过去。</li>
                      <li>themes：主题文件夹。Hexo会根据主题来生成静态页面。</li>
                      <li>node_modules：node.js模块，一些 <strong>插件</strong> 和
                        <strong>依赖</strong>
                        会被安装到这里。</li>
                    </ul>
                    <div class="note info">
                      <p>更加详细的解释请参考<a href="https://hexo.io/zh-cn/docs/" target="_blank"
                                                                                                        rel="noopener">hexo官方文档</a>
                      </p>
                    </div>
                    <h2 id="安装NexT主题"><a href="#安装NexT主题" class="headerlink"
                                                                                                      title="安装NexT主题"></a>安装NexT主题
                    </h2>
                    <p>
                      进入本地博客文件夹并将NexT主题<code>clone</code>至<code>themes</code>文件夹下<br>
                      <figure class="highlight bash">
                        <table>
                          <tr>
                            <td class="gutter">
                              <pre><span class="line">1</span><br><span class="line">2</span><br></pre>
                            </td>
                            <td class="code">
                              <pre><span class="line"><span class="built_in">cd</span> C:/hexo/myblog</span><br><span class="line">git <span class="built_in">clone</span> https://github.com/theme-next/hexo-theme-next themes/next</span><br></pre>
                            </td>
                          </tr>
                        </table>
                      </figure>
                    </p>
                    <p>接着，进入<code>./themes/next/</code>文件夹，将
                      <strong>隐藏文件夹</strong>
                      <code>.git</code>删除。这一步是为了后面将网站源码push到github上的
                      <strong>必要工作</strong>。</p>
                    <p>
                      你会看到，在<code>next</code>下也有一个<code>_config.yml</code>的文件，这是
                      <strong>NexT主题的配置文件</strong>，为了区别它和
                      <strong>博客配置文件</strong>，下面会用带路径的文件名来描述它们：
                    </p>
                    <ul>
                      <li><code>myblog/_config.yml</code>：博客配置文件</li>
                      <li><code>next/_config.yml</code>：主题配置文件</li>
                    </ul>
                    <h2 id="启用NexT主题"><a href="#启用NexT主题" class="headerlink"
                                                                                                      title="启用NexT主题"></a>启用NexT主题
                    </h2>
                    <p>
                      在<code>myblog/_config.yml</code>里<code>theme:</code>选项填<code>next</code>，=&gt;<code>theme:
                        next</code>，注意冒号后空一格。</p>
                    <p>到这里，建站的任务就完成了。你现在可以打开控制台，输入并执行如下命令：<br>
                      <figure class="highlight bash">
                        <table>
                          <tr>
                            <td class="gutter">
                              <pre><span class="line">1</span><br><span class="line">2</span><br></pre>
                            </td>
                            <td class="code">
                              <pre><span class="line"><span class="built_in">cd</span> C:/hexo/myblog</span><br><span class="line">hexo g &amp;&amp; hexo s</span><br></pre>
                            </td>
                          </tr>
                        </table>
                      </figure>
                    </p>
                    <p>其中</p>
                    <ul>
                      <li><code>hexo
                          g</code>：新建<code>public</code>文件夹，并在其中生成网站静态文件（html，css，等文件）
                      </li>
                      <li><code>hexo
                          s</code>：启动hexo服务器，默认情况下，访问网址为：<code>http://localhost:4000/</code>
                      </li>
                    </ul>
                    <div class="note info">
                      <p>更多有关hexo的命令，请参考<a href="https://hexo.io/zh-cn/docs/" target="_blank"
                                                                                                        rel="noopener">hexo官方文档</a>的<a
                                                                                                        href="https://hexo.io/zh-cn/docs/commands.html"
                                                                                                        target="_blank"
                                                                                                        rel="noopener">命令</a>部分。
                      </p>
                    </div>
                    <p>你会看到控制台有如下输出：<br>
                      <figure class="highlight bash">
                        <table>
                          <tr>
                            <td class="gutter">
                              <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br></pre>
                            </td>
                            <td class="code">
                              <pre><span class="line">INFO  Start processing</span><br><span class="line">INFO  Files loaded <span class="keyword">in</span> 624 ms</span><br><span class="line">INFO  Generated: index.html</span><br><span class="line">INFO  Generated: archives/index.html</span><br><span class="line">INFO  Generated: images/algolia_logo.svg</span><br><span class="line">INFO  Generated: images/cc-by-nc-nd.svg</span><br><span class="line">INFO  Generated: images/cc-by-nc-sa.svg</span><br><span class="line">INFO  Generated: images/avatar.gif</span><br><span class="line">INFO  Generated: images/cc-by-nc.svg</span><br><span class="line">INFO  Generated: images/apple-touch-icon-next.png</span><br><span class="line">INFO  Generated: images/cc-by-sa.svg</span><br><span class="line">INFO  Generated: images/cc-by.svg</span><br><span class="line">INFO  Generated: images/cc-zero.svg</span><br><span class="line">INFO  Generated: images/cc-by-nd.svg</span><br><span class="line">INFO  Generated: images/favicon-32x32-next.png</span><br><span class="line">INFO  Generated: images/favicon-16x16-next.png</span><br><span class="line">INFO  Generated: images/loading.gif</span><br><span class="line">INFO  Generated: images/placeholder.gif</span><br><span class="line">INFO  Generated: images/logo.svg</span><br><span class="line">INFO  Generated: images/quote-r.svg</span><br><span class="line">INFO  Generated: images/quote-l.svg</span><br><span class="line">INFO  Generated: images/searchicon.png</span><br><span class="line">INFO  Generated: archives/2018/01/index.html</span><br><span class="line">INFO  Generated: archives/2018/index.html</span><br><span class="line">INFO  Generated: lib/font-awesome/HELP-US-OUT.txt</span><br><span class="line">INFO  Generated: css/main.css</span><br><span class="line">INFO  Generated: lib/velocity/velocity.ui.min.js</span><br><span class="line">INFO  Generated: lib/velocity/velocity.min.js</span><br><span class="line">INFO  Generated: lib/font-awesome/bower.json</span><br><span class="line">INFO  Generated: lib/velocity/velocity.js</span><br><span class="line">INFO  Generated: lib/velocity/velocity.ui.js</span><br><span class="line">INFO  Generated: lib/jquery/index.js</span><br><span class="line">INFO  Generated: lib/font-awesome/fonts/fontawesome-webfont.woff</span><br><span class="line">INFO  Generated: lib/font-awesome/fonts/fontawesome-webfont.woff2</span><br><span class="line">INFO  Generated: js/src/affix.js</span><br><span class="line">INFO  Generated: lib/ua-parser-js/dist/ua-parser.min.js</span><br><span class="line">INFO  Generated: js/src/bootstrap.js</span><br><span class="line">INFO  Generated: js/src/motion.js</span><br><span class="line">INFO  Generated: js/src/js.cookie.js</span><br><span class="line">INFO  Generated: js/src/exturl.js</span><br><span class="line">INFO  Generated: js/src/algolia-search.js</span><br><span class="line">INFO  Generated: js/src/post-details.js</span><br><span class="line">INFO  Generated: js/src/scrollspy.js</span><br><span class="line">INFO  Generated: lib/ua-parser-js/dist/ua-parser.pack.js</span><br><span class="line">INFO  Generated: lib/font-awesome/css/font-awesome.min.css</span><br><span class="line">INFO  Generated: js/src/utils.js</span><br><span class="line">INFO  Generated: js/src/scroll-cookie.js</span><br><span class="line">INFO  Generated: lib/font-awesome/css/font-awesome.css.map</span><br><span class="line">INFO  Generated: lib/font-awesome/css/font-awesome.css</span><br><span class="line">INFO  Generated: 2018/01/22/hello-world/index.html</span><br><span class="line">INFO  Generated: lib/font-awesome/fonts/fontawesome-webfont.eot</span><br><span class="line">INFO  Generated: js/src/schemes/pisces.js</span><br><span class="line">INFO  50 files generated <span class="keyword">in</span> 865 ms</span><br><span class="line">INFO  Start processing</span><br><span class="line">INFO  Hexo is running at http://localhost:4000/. Press Ctrl+C to stop.</span><br></pre>
                            </td>
                          </tr>
                        </table>
                      </figure>
                    </p>
                    <p>
                      在浏览器地址栏输入<code>http://localhost:4000/</code>并访问，你应该会看到如下页面：<br><img
                                                                                                      src="/posts/Hexo%20+%20NexT%20+%20Github%20Pages%20+%20Coding%20Pages%20+%20Gitee%20Pages%20+%20Travis%20全攻略/pic2.png">
                    </p>
                    <div class="note success">
                      <p><i class="fa fa-thumbs-o-up"
                                                                                                        aria-hidden="true"></i>&nbsp;<strong>恭喜你！你已经完成了博客搭建的主要工作！接下来就是细节的配置了。请耐心阅读以下内容。</strong>
                      </p>
                    </div>
                    <hr>
                    <h1 id="配置博客配置文件"><a href="#配置博客配置文件" class="headerlink"
                                                                                                      title="配置博客配置文件"></a>配置博客配置文件
                    </h1>
                    <p>整个<code>myblog/_config.yml</code>的内容如下：<br>
                      <figure class="highlight yaml">
                        <table>
                          <tr>
                            <td class="gutter">
                              <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br></pre>
                            </td>
                            <td class="code">
                              <pre><span class="line"><span class="comment"># Hexo Configuration</span></span><br><span class="line"><span class="comment">## Docs: https://hexo.io/docs/configuration.html</span></span><br><span class="line"><span class="comment">## Source: https://github.com/hexojs/hexo/</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># Site</span></span><br><span class="line"><span class="attr">title:</span> <span class="string">Hexo</span></span><br><span class="line"><span class="attr">subtitle:</span></span><br><span class="line"><span class="attr">description:</span></span><br><span class="line"><span class="attr">author:</span> <span class="string">John</span> <span class="string">Doe</span></span><br><span class="line"><span class="attr">language:</span></span><br><span class="line"><span class="attr">timezone:</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># URL</span></span><br><span class="line"><span class="comment">## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'</span></span><br><span class="line"><span class="attr">url:</span> <span class="attr">http://yoursite.com</span></span><br><span class="line"><span class="attr">root:</span> <span class="string">/</span></span><br><span class="line"><span class="attr">permalink:</span> <span class="string">:year/:month/:day/:title/</span></span><br><span class="line"><span class="attr">permalink_defaults:</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># Directory</span></span><br><span class="line"><span class="attr">source_dir:</span> <span class="string">source</span></span><br><span class="line"><span class="attr">public_dir:</span> <span class="string">public</span></span><br><span class="line"><span class="attr">tag_dir:</span> <span class="string">tags</span></span><br><span class="line"><span class="attr">archive_dir:</span> <span class="string">archives</span></span><br><span class="line"><span class="attr">category_dir:</span> <span class="string">categories</span></span><br><span class="line"><span class="attr">code_dir:</span> <span class="string">downloads/code</span></span><br><span class="line"><span class="attr">i18n_dir:</span> <span class="string">:lang</span></span><br><span class="line"><span class="attr">skip_render:</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># Writing</span></span><br><span class="line"><span class="attr">new_post_name:</span> <span class="string">:title.md</span> <span class="comment"># File name of new posts</span></span><br><span class="line"><span class="attr">default_layout:</span> <span class="string">post</span></span><br><span class="line"><span class="attr">titlecase:</span> <span class="literal">false</span> <span class="comment"># Transform title into titlecase</span></span><br><span class="line"><span class="attr">external_link:</span> <span class="literal">true</span> <span class="comment"># Open external links in new tab</span></span><br><span class="line"><span class="attr">filename_case:</span> <span class="number">0</span></span><br><span class="line"><span class="attr">render_drafts:</span> <span class="literal">false</span></span><br><span class="line"><span class="attr">post_asset_folder:</span> <span class="literal">false</span></span><br><span class="line"><span class="attr">relative_link:</span> <span class="literal">false</span></span><br><span class="line"><span class="attr">future:</span> <span class="literal">true</span></span><br><span class="line"><span class="attr">highlight:</span></span><br><span class="line"><span class="attr">  enable:</span> <span class="literal">true</span></span><br><span class="line"><span class="attr">  line_number:</span> <span class="literal">true</span></span><br><span class="line"><span class="attr">  auto_detect:</span> <span class="literal">false</span></span><br><span class="line"><span class="attr">  tab_replace:</span></span><br><span class="line">  </span><br><span class="line"><span class="comment"># Home page setting</span></span><br><span class="line"><span class="comment"># path: Root path for your blogs index page. (default = '')</span></span><br><span class="line"><span class="comment"># per_page: Posts displayed per page. (0 = disable pagination)</span></span><br><span class="line"><span class="comment"># order_by: Posts order. (Order by date descending by default)</span></span><br><span class="line"><span class="attr">index_generator:</span></span><br><span class="line"><span class="attr">  path:</span> <span class="string">''</span></span><br><span class="line"><span class="attr">  per_page:</span> <span class="number">10</span></span><br><span class="line"><span class="attr">  order_by:</span> <span class="bullet">-date</span></span><br><span class="line">  </span><br><span class="line"><span class="comment"># Category &amp; Tag</span></span><br><span class="line"><span class="attr">default_category:</span> <span class="string">uncategorized</span></span><br><span class="line"><span class="attr">category_map:</span></span><br><span class="line"><span class="attr">tag_map:</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># Date / Time format</span></span><br><span class="line"><span class="comment">## Hexo uses Moment.js to parse and display date</span></span><br><span class="line"><span class="comment">## You can customize the date format as defined in</span></span><br><span class="line"><span class="comment">## http://momentjs.com/docs/#/displaying/format/</span></span><br><span class="line"><span class="attr">date_format:</span> <span class="string">YYYY-MM-DD</span></span><br><span class="line"><span class="attr">time_format:</span> <span class="attr">HH:mm:ss</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># Pagination</span></span><br><span class="line"><span class="comment">## Set per_page to 0 to disable pagination</span></span><br><span class="line"><span class="attr">per_page:</span> <span class="number">10</span></span><br><span class="line"><span class="attr">pagination_dir:</span> <span class="string">page</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># Extensions</span></span><br><span class="line"><span class="comment">## Plugins: https://hexo.io/plugins/</span></span><br><span class="line"><span class="comment">## Themes: https://hexo.io/themes/</span></span><br><span class="line"><span class="attr">theme:</span> <span class="string">next</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># Deployment</span></span><br><span class="line"><span class="comment">## Docs: https://hexo.io/docs/deployment.html</span></span><br><span class="line"><span class="attr">deploy:</span></span><br><span class="line"><span class="attr">  type:</span></span><br></pre>
                            </td>
                          </tr>
                        </table>
                      </figure>
                    </p>
                    <h2 id="博客基础配置"><a href="#博客基础配置" class="headerlink"
                                                                                                      title="博客基础配置"></a>博客基础配置
                    </h2>
                    <p>这里是配置博客基础的地方，包括
                      <strong>博客名</strong>，<strong>小标题</strong>，<strong>描述</strong>，<strong>站长名（你的昵称）</strong>，<strong>语言</strong>，<strong>时区</strong>。<br>
                      <figure class="highlight yaml">
                        <table>
                          <tr>
                            <td class="gutter">
                              <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre>
                            </td>
                            <td class="code">
                              <pre><span class="line"><span class="comment"># Site</span></span><br><span class="line"><span class="attr">title:</span> <span class="comment"># 博客名</span></span><br><span class="line"><span class="attr">subtitle:</span> <span class="comment"># 小标题</span></span><br><span class="line"><span class="attr">description:</span> <span class="comment"># 描述</span></span><br><span class="line"><span class="attr">author:</span> <span class="comment"># 你叫啥</span></span><br><span class="line"><span class="attr">language:</span> <span class="comment"># 语言</span></span><br><span class="line"><span class="attr">timezone:</span> <span class="comment"># 时区</span></span><br></pre>
                            </td>
                          </tr>
                        </table>
                      </figure>
                    </p>
                    <p>下面是我的配置：<br>
                      <figure class="highlight yaml">
                        <table>
                          <tr>
                            <td class="gutter">
                              <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre>
                            </td>
                            <td class="code">
                              <pre><span class="line"><span class="comment"># Site</span></span><br><span class="line"><span class="attr">title:</span> <span class="string">淦</span></span><br><span class="line"><span class="attr">subtitle:</span> <span class="string">n*m*lg(b)</span></span><br><span class="line"><span class="attr">description:</span> <span class="string">汝亦知射乎？吾射不亦精乎？</span></span><br><span class="line"><span class="attr">author:</span> <span class="string">tankeryang</span></span><br><span class="line"><span class="attr">language:</span> <span class="string">zh-Hans</span></span><br><span class="line"><span class="attr">timezone:</span></span><br></pre>
                            </td>
                          </tr>
                        </table>
                      </figure>
                    </p>
                    <p>你可以参考一下 <strong>哪项配置分别对应哪个位置</strong>，其中<code>language:
                        zh-Hans</code>这里是根据
                      <strong>主题是否支持</strong>
                      来设置的，因为渲染的js和css等文件都在主题里。NexT主题支持的语言<a href="http://theme-next.iissnan.com/getting-started.html#select-language"
                                                                                                      target="_blank"
                                                                                                      rel="noopener">参考这里</a>。hexo默认使用您计算机设置的时区。更改时区请参考<a
                                                                                                      href="https://en.wikipedia.org/wiki/List_of_tz_database_time_zones"
                                                                                                      target="_blank"
                                                                                                      rel="noopener">时区列表</a>，比如如果您想换成
                      <strong>纽约时区</strong>，您需填<code>America/New_York</code>。
                    </p>
                    <div class="note warning">
                      <p>注意，您在查看NexT支持的语言时访问的是<code>v5.x</code>的<a href="http://theme-next.iissnan.com/getting-started.html"
                                                                                                        target="_blank"
                                                                                                        rel="noopener">NexT使用文档</a>，阅读时请注意。<code>v6.x</code>的github地址在<a
                                                                                                        href="https://github.com/theme-next/hexo-theme-next"
                                                                                                        target="_blank"
                                                                                                        rel="noopener">这里</a>，官网在<a
                                                                                                        href="https://theme-next.org/"
                                                                                                        target="_blank"
                                                                                                        rel="noopener">这里</a>
                      </p>
                    </div>
                    <h2 id="博客url配置"><a href="#博客url配置" class="headerlink"
                                                                                                      title="博客url配置"></a>博客url配置
                    </h2>
                    <p>这里是配置你的博客 <strong>链接格式</strong> 的，包括 <strong>主站</strong>
                      和
                      <strong>文章</strong> 链接。<br>
                      <figure class="highlight yaml">
                        <table>
                          <tr>
                            <td class="gutter">
                              <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre>
                            </td>
                            <td class="code">
                              <pre><span class="line"><span class="comment"># URL</span></span><br><span class="line"><span class="comment">## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'</span></span><br><span class="line"><span class="attr">url:</span>  <span class="attr">http://yoursite.com</span> <span class="comment"># 博客链接</span></span><br><span class="line"><span class="attr">root:</span> <span class="string">/</span> <span class="comment"># 博客根目录</span></span><br><span class="line"><span class="attr">permalink:</span> <span class="string">:year/:month/:day/:title/</span> <span class="comment"># 文章的永久链接格式</span></span><br><span class="line"><span class="attr">permalink_defaults:</span> <span class="comment"># 永久链接中各部分的默认值</span></span><br></pre>
                            </td>
                          </tr>
                        </table>
                      </figure>
                    </p>
                    <p>这是我的配置：<br>
                      <figure class="highlight yaml">
                        <table>
                          <tr>
                            <td class="gutter">
                              <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre>
                            </td>
                            <td class="code">
                              <pre><span class="line"><span class="attr">url:</span> <span class="attr">https://tankeryang.github.io</span></span><br><span class="line"><span class="attr">root:</span> <span class="string">/</span></span><br><span class="line"><span class="attr">permalink:</span> <span class="string">posts/:title/</span></span><br><span class="line"><span class="attr">permalink_defaults:</span></span><br></pre>
                            </td>
                          </tr>
                        </table>
                      </figure>
                    </p>
                    <p>
                      这里我的博客链接是<code>https://tankeryang.github.io</code>，因为我是挂在github上的。<code>root</code>设置为<code>/</code>。如果你的博客是在
                      <strong>子目录</strong>
                      下，如<code>http://yoursite.com/child</code>，你需这样设置：<br>
                      <figure class="highlight yaml">
                        <table>
                          <tr>
                            <td class="gutter">
                              <pre><span class="line">1</span><br><span class="line">2</span><br></pre>
                            </td>
                            <td class="code">
                              <pre><span class="line"><span class="attr">url:</span> <span class="attr">http://yoursite.com/child</span></span><br><span class="line"><span class="attr">root:</span> <span class="string">/child/</span></span><br></pre>
                            </td>
                          </tr>
                        </table>
                      </figure>
                    </p>
                    <p>
                      接着是<code>permalink</code>的配置，hexo默认的是<code>:year/:month/:day/:title/</code>的格式。比如我点开博客搭建好之后的默认博文
                      <strong>Hello
                        World</strong>，它的链接是这样的：<code>http://localhost:4000/2018/01/22/hello-world/</code>：<br><img
                                                                                                      src="/posts/Hexo%20+%20NexT%20+%20Github%20Pages%20+%20Coding%20Pages%20+%20Gitee%20Pages%20+%20Travis%20全攻略/pic3.png">
                    </p>
                    <p>如果你想 <strong>更改文章永久链接格式</strong>
                      的话，以下是和链接格式有关的变量，你可以根据以下变量来配置：</p>
                    <table>
                      <thead>
                        <tr>
                          <th style="text-align:center">变量</th>
                          <th style="text-align:center">描述</th>
                        </tr>
                      </thead>
                      <tbody>
                        <tr>
                          <td style="text-align:center"><code>:year</code></td>
                          <td style="text-align:center">文章的发表年份（4 位数）</td>
                        </tr>
                        <tr>
                          <td style="text-align:center"><code>:month</code></td>
                          <td style="text-align:center">文章的发表月份（2 位数）</td>
                        </tr>
                        <tr>
                          <td style="text-align:center"><code>:i_month</code>
                          </td>
                          <td style="text-align:center">文章的发表月份（去掉开头的零）</td>
                        </tr>
                        <tr>
                          <td style="text-align:center"><code>:day</code></td>
                          <td style="text-align:center">文章的发表日期 (2 位数)</td>
                        </tr>
                        <tr>
                          <td style="text-align:center"><code>:i_day</code></td>
                          <td style="text-align:center">文章的发表日期（去掉开头的零）</td>
                        </tr>
                        <tr>
                          <td style="text-align:center"><code>:title</code></td>
                          <td style="text-align:center">文件名称</td>
                        </tr>
                        <tr>
                          <td style="text-align:center"><code>:id</code></td>
                          <td style="text-align:center">文章 ID</td>
                        </tr>
                      </tbody>
                    </table>
                    <div class="note info">
                      <p>更多有关链接的配置，请参考<a href="https://hexo.io/zh-cn/docs/" target="_blank"
                                                                                                        rel="noopener">hexo官方文档</a>中的<a
                                                                                                        href="https://hexo.io/zh-cn/docs/permalinks.html"
                                                                                                        target="_blank"
                                                                                                        rel="noopener">永久链接</a>部分。
                      </p>
                    </div>
                    <hr>
                    <blockquote>
                      <p><i class="fa fa-hand-o-down"
                                                                                                        aria-hidden="true"></i>&nbsp;
                        <font color="#aeaeae">
                          以下内容更新于2018/1/24，承接上文</font>
                      </p>
                    </blockquote>
                    <h2 id="配置资源文件夹"><a href="#配置资源文件夹" class="headerlink"
                                                                                                      title="配置资源文件夹"></a>配置资源文件夹
                    </h2>
                    <p>资源（Asset）代表source文件夹中除了文章以外的所有文件，例如图片、CSS、JS
                      文件等。比方说，如果你的Hexo项目中只有少量图片，那最简单的方法就是将它们放在 source/images
                      文件夹中。然后通过类似于<code>![](/images/image.jpg)</code>的方法访问它们。
                    </p>
                    <p>
                      如果你想要更有规律地提供图片和其他资源以及想要将他们的资源分布在各个文章上的人来说，Hexo也提供了更组织化的方式来管理资源。这个稍微有些复杂但是管理资源非常方便的功能可以通过将<code>config.yml</code>文件中的<code>post_asset_folder</code>选项设为<code>true</code>来打开：<br>
                      <figure class="highlight yaml">
                        <table>
                          <tr>
                            <td class="gutter">
                              <pre><span class="line">1</span><br></pre>
                            </td>
                            <td class="code">
                              <pre><span class="line"><span class="attr">post_asset_folder:</span> <span class="literal">true</span> <span class="comment"># 设置为true</span></span><br></pre>
                            </td>
                          </tr>
                        </table>
                      </figure>
                    </p>
                    <p>设置为<code>true</code>后，当你新建一篇文章时，hexo同时会新建一个
                      <strong>和文章标题一样名字</strong>
                      的文件夹，你的文章所引用的图片等资源就可以放在这里面了。</p>
                    <p>将所有与你的文章有关的资源放在这个关联文件夹中之后，你可以通过<a
                                                                                                      href="#标签插件"><strong>标签插件</strong></a>来引用它们，这样你就得到了一个更简单而且方便得多的工作流。关于什么是标签插件，接下来的内容会说明。请耐心阅读。（你也可以点击上面的链接浏览一下标签插件的内容）
                    </p>
                    <hr>
                    <blockquote>
                      <p><i class="fa fa-hand-o-down"
                                                                                                        aria-hidden="true"></i>&nbsp;
                        <font color="#aeaeae">
                          以下内容更新于2018/1/25，承接上文（不好意思，本人很懒…）</font>
                      </p>
                    </blockquote>
                    <h1 id="写作"><a href="#写作" class="headerlink"
                                                                                                      title="写作"></a>写作
                    </h1>
                    <h2 id="新建文章"><a href="#新建文章" class="headerlink"
                                                                                                      title="新建文章"></a>新建文章
                    </h2>
                    <p>执行如下命令新建文章：<br>
                      <figure class="highlight bash">
                        <table>
                          <tr>
                            <td class="gutter">
                              <pre><span class="line">1</span><br></pre>
                            </td>
                            <td class="code">
                              <pre><span class="line">hexo new [layout] &lt;title&gt;</span><br></pre>
                            </td>
                          </tr>
                        </table>
                      </figure>
                    </p>
                    <p>其中<code>[layout]</code>字段是文章的
                      <strong>布局</strong>，默认为<code>post</code>，可以通过修改<code>_config.yml</code>中的<code>default_layout</code>参数来指定默认布局。<code>&lt;title&gt;</code>则是文章标题。
                    </p>
                    <h3 id="布局"><a href="#布局" class="headerlink"
                                                                                                      title="布局"></a>布局
                    </h3>
                    <p>Hexo
                      有三种默认布局：<code>post</code>、<code>page</code>和<code>draft</code>，它们分别对应不同的路径，而您
                      <strong>自定义的其他布局</strong>
                      和<code>post</code>相同，都将储存到<code>source/_posts</code>文件夹。
                    </p>
                    <table>
                      <thead>
                        <tr>
                          <th style="text-align:center">布局</th>
                          <th style="text-align:center">路径</th>
                        </tr>
                      </thead>
                      <tbody>
                        <tr>
                          <td style="text-align:center"><code>post</code></td>
                          <td style="text-align:center">
                            <code>source/_posts</code></td>
                        </tr>
                        <tr>
                          <td style="text-align:center"><code>page</code></td>
                          <td style="text-align:center"><code>source</code></td>
                        </tr>
                        <tr>
                          <td style="text-align:center"><code>draft</code></td>
                          <td style="text-align:center">
                            <code>source/_draft</code></td>
                        </tr>
                      </tbody>
                    </table>
                    <p>其实布局我到现在也不是很清楚是什么，<strong>我是这样认为的：</strong></p>
                    <div class="note primary">
                      <p>如果你执行了这条命令<code>hexo new post &quot;new
                          article&quot;</code>，hexo会新建一个<code>new
                          article.md</code>文件在<code>source/_post</code>文件夹下。同理，其他两个布局参照上面的路径新建文章。
                      </p>
                    </div>
                    <h3 id="文件名称"><a href="#文件名称" class="headerlink"
                                                                                                      title="文件名称"></a>文件名称
                    </h3>
                    <p>Hexo默认以 <strong>标题</strong>
                      作为文件名称，你也可编辑<code>myblog/_config.yml</code>中的<code>new_post_name</code>参数来改变默认的文件名称，比如设置为：<br>
                      <figure class="highlight yaml">
                        <table>
                          <tr>
                            <td class="gutter">
                              <pre><span class="line">1</span><br></pre>
                            </td>
                            <td class="code">
                              <pre><span class="line"><span class="attr">new_post_name:</span> <span class="string">:year-:month-:day-:title.md</span> <span class="comment"># File name of new posts</span></span><br></pre>
                            </td>
                          </tr>
                        </table>
                      </figure>
                    </p>
                    <p>这样在 <strong>文章名</strong> 前面就会加上日期和时间共同组成
                      <strong>文件名</strong>。</p>
                    <p>下面是一些可用来配置文件名的变量：</p>
                    <table>
                      <thead>
                        <tr>
                          <th style="text-align:center">变量</th>
                          <th style="text-align:center">描述</th>
                        </tr>
                      </thead>
                      <tbody>
                        <tr>
                          <td style="text-align:center"><code>:title</code></td>
                          <td style="text-align:center">标题（小写，空格将会被替换为短杠）</td>
                        </tr>
                        <tr>
                          <td style="text-align:center"><code>:year</code></td>
                          <td style="text-align:center">建立的年份,比如，2015</td>
                        </tr>
                        <tr>
                          <td style="text-align:center"><code>:month</code></td>
                          <td style="text-align:center">
                            建立的月份（有前导零），比如，<code>04</code></td>
                        </tr>
                        <tr>
                          <td style="text-align:center"><code>i_month</code>
                          </td>
                          <td style="text-align:center">
                            建立的月份（无前导零），比如，<code>4</code></td>
                        </tr>
                        <tr>
                          <td style="text-align:center"><code>:day</code></td>
                          <td style="text-align:center">
                            建立的日期（有前导零），比如，<code>07</code></td>
                        </tr>
                        <tr>
                          <td style="text-align:center"><code>i_day</code></td>
                          <td style="text-align:center">
                            建立的日期（无前导零），比如，<code>7</code></td>
                        </tr>
                      </tbody>
                    </table>
                    <div class="note info">
                      <p>更多有关 <strong>基本写作设置</strong> 的内容请参考<a href="https://hexo.io/zh-cn/docs" target="_blank"
                                                                                                        rel="noopener">hexo官方文档</a>的<a
                                                                                                        href="https://hexo.io/zh-cn/docs/writing.html"
                                                                                                        target="_blank"
                                                                                                        rel="noopener">写作</a>部分。
                      </p>
                    </div>
                    <h3 id="下面，我们就来尝试一下吧！"><a href="#下面，我们就来尝试一下吧！" class="headerlink"
                                                                                                      title="下面，我们就来尝试一下吧！"></a>下面，我们就来尝试一下吧！
                    </h3>
                    <p>首先，执行<br>
                      <figure class="highlight bash">
                        <table>
                          <tr>
                            <td class="gutter">
                              <pre><span class="line">1</span><br></pre>
                            </td>
                            <td class="code">
                              <pre><span class="line">hexo new post <span class="string">"caonima"</span></span><br></pre>
                            </td>
                          </tr>
                        </table>
                      </figure>
                    </p>
                    <p>你会看到输出<br>
                      <figure class="highlight plain">
                        <table>
                          <tr>
                            <td class="gutter">
                              <pre><span class="line">1</span><br></pre>
                            </td>
                            <td class="code">
                              <pre><span class="line">INFO  Created: C:/hexo/myblog/source/_posts/caonima.md</span><br></pre>
                            </td>
                          </tr>
                        </table>
                      </figure>
                    </p>
                    <p>
                      同时，在<code>source/_post</code>文件夹下多了<code>caonima.md</code>文件和<code>caonima</code>文件夹。<br>
                      <figure class="highlight plain">
                        <table>
                          <tr>
                            <td class="gutter">
                              <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre>
                            </td>
                            <td class="code">
                              <pre><span class="line">.</span><br><span class="line">├── caonima.md</span><br><span class="line">├── hello-world.md</span><br><span class="line">├── caonima</span><br></pre>
                            </td>
                          </tr>
                        </table>
                      </figure>
                    </p>
                    <p>打开<code>caonima.md</code>，你会看到这些<br>
                      <figure class="highlight yaml">
                        <table>
                          <tr>
                            <td class="gutter">
                              <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre>
                            </td>
                            <td class="code">
                              <pre><span class="line"><span class="meta">---</span></span><br><span class="line"><span class="attr">title:</span> <span class="string">caonima</span></span><br><span class="line"><span class="attr">date:</span> <span class="number">2018</span><span class="bullet">-01</span><span class="bullet">-25</span> <span class="number">13</span><span class="string">:06:28</span></span><br><span class="line"><span class="attr">tags:</span></span><br><span class="line"><span class="meta">---</span></span><br></pre>
                            </td>
                          </tr>
                        </table>
                      </figure>
                    </p>
                    <p>这些是
                      <strong>front-matter</strong>，下面我会对它进行说明，请耐心阅读（<del>这句话我到底讲了几次</del>）。<br>接下来你可以随便在里面写点内容，比如：<br>
                      <figure class="highlight markdown">
                        <table>
                          <tr>
                            <td class="gutter">
                              <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre>
                            </td>
                            <td class="code">
                              <pre><span class="line"><span class="section"># caonima</span></span><br><span class="line"><span class="section">## caonima</span></span><br><span class="line"><span class="section">### caonima</span></span><br><span class="line"><span class="strong">__caonima__</span></span><br><span class="line"><span class="emphasis">_caonima_</span></span><br><span class="line"><span class="bullet">* </span>caonima</span><br><span class="line"></span><br><span class="line"><span class="quote">&gt; caonima</span></span><br><span class="line"></span><br><span class="line">[<span class="string">caonima</span>](<span class="link"></span>)</span><br><span class="line">~~caonima~~</span><br><span class="line"><span class="code">`caonima`</span></span><br></pre>
                            </td>
                          </tr>
                        </table>
                      </figure>
                    </p>
                    <p>保存。执行下面语句生成博客文件并运行本地hexo服务端：<br>
                      <figure class="highlight bash">
                        <table>
                          <tr>
                            <td class="gutter">
                              <pre><span class="line">1</span><br></pre>
                            </td>
                            <td class="code">
                              <pre><span class="line">hexo g &amp;&amp; hexo s</span><br></pre>
                            </td>
                          </tr>
                        </table>
                      </figure>
                    </p>
                    <p>你会看到如下输出：<br>
                      <figure class="highlight bash">
                        <table>
                          <tr>
                            <td class="gutter">
                              <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br></pre>
                            </td>
                            <td class="code">
                              <pre><span class="line">INFO  Start processing</span><br><span class="line">INFO  Files loaded <span class="keyword">in</span> 642 ms</span><br><span class="line">INFO  Generated: 2018/01/22/hello-world/index.html</span><br><span class="line">INFO  Generated: archives/index.html</span><br><span class="line">INFO  Generated: index.html</span><br><span class="line">INFO  Generated: archives/2018/01/index.html</span><br><span class="line">INFO  Generated: archives/2018/index.html</span><br><span class="line">INFO  Generated: images/avatar.gif</span><br><span class="line">INFO  Generated: images/apple-touch-icon-next.png</span><br><span class="line">INFO  Generated: images/cc-by-nc-nd.svg</span><br><span class="line">INFO  Generated: images/algolia_logo.svg</span><br><span class="line">INFO  Generated: images/cc-by-nc-sa.svg</span><br><span class="line">INFO  Generated: images/cc-by-nd.svg</span><br><span class="line">INFO  Generated: images/cc-by-nc.svg</span><br><span class="line">INFO  Generated: images/cc-by.svg</span><br><span class="line">INFO  Generated: images/favicon-16x16-next.png</span><br><span class="line">INFO  Generated: images/cc-zero.svg</span><br><span class="line">INFO  Generated: images/favicon-32x32-next.png</span><br><span class="line">INFO  Generated: images/cc-by-sa.svg</span><br><span class="line">INFO  Generated: images/logo.svg</span><br><span class="line">INFO  Generated: images/placeholder.gif</span><br><span class="line">INFO  Generated: images/quote-l.svg</span><br><span class="line">INFO  Generated: images/loading.gif</span><br><span class="line">INFO  Generated: images/quote-r.svg</span><br><span class="line">INFO  Generated: lib/font-awesome/HELP-US-OUT.txt</span><br><span class="line">INFO  Generated: lib/font-awesome/css/font-awesome.css.map</span><br><span class="line">INFO  Generated: images/searchicon.png</span><br><span class="line">INFO  Generated: lib/font-awesome/fonts/fontawesome-webfont.woff2</span><br><span class="line">INFO  Generated: lib/font-awesome/fonts/fontawesome-webfont.woff</span><br><span class="line">INFO  Generated: js/src/algolia-search.js</span><br><span class="line">INFO  Generated: js/src/exturl.js</span><br><span class="line">INFO  Generated: js/src/affix.js</span><br><span class="line">INFO  Generated: js/src/post-details.js</span><br><span class="line">INFO  Generated: js/src/motion.js</span><br><span class="line">INFO  Generated: js/src/scroll-cookie.js</span><br><span class="line">INFO  Generated: js/src/utils.js</span><br><span class="line">INFO  Generated: js/src/scrollspy.js</span><br><span class="line">INFO  Generated: lib/font-awesome/bower.json</span><br><span class="line">INFO  Generated: js/src/js.cookie.js</span><br><span class="line">INFO  Generated: js/src/bootstrap.js</span><br><span class="line">INFO  Generated: lib/velocity/velocity.ui.min.js</span><br><span class="line">INFO  Generated: lib/ua-parser-js/dist/ua-parser.pack.js</span><br><span class="line">INFO  Generated: js/src/schemes/pisces.js</span><br><span class="line">INFO  Generated: lib/ua-parser-js/dist/ua-parser.min.js</span><br><span class="line">INFO  Generated: css/main.css</span><br><span class="line">INFO  Generated: lib/jquery/index.js</span><br><span class="line">INFO  Generated: lib/velocity/velocity.ui.js</span><br><span class="line">INFO  Generated: lib/font-awesome/css/font-awesome.css</span><br><span class="line">INFO  Generated: lib/velocity/velocity.min.js</span><br><span class="line">INFO  Generated: lib/font-awesome/css/font-awesome.min.css</span><br><span class="line">INFO  Generated: lib/velocity/velocity.js</span><br><span class="line">INFO  Generated: lib/font-awesome/fonts/fontawesome-webfont.eot</span><br><span class="line">INFO  Generated: 2018/01/25/caonima/index.html</span><br><span class="line">INFO  51 files generated <span class="keyword">in</span> 1 s</span><br><span class="line">INFO  Start processing</span><br><span class="line">INFO  Hexo is running at http://localhost:4000/. Press Ctrl+C to stop.</span><br></pre>
                            </td>
                          </tr>
                        </table>
                      </figure>
                    </p>
                    <p>
                      在浏览器输入<code>http://localhost:4000/</code>并访问，你会看到这样的页面：<br><img
                                                                                                      src="/posts/Hexo%20+%20NexT%20+%20Github%20Pages%20+%20Coding%20Pages%20+%20Gitee%20Pages%20+%20Travis%20全攻略/pic4.png">
                    </p>
                    <div class="note success">
                      <p><i class="fa fa-thumbs-o-up"
                                                                                                        aria-hidden="true"></i>&nbsp;<strong>恭喜你！你已经可以进行简单的文字创作了！下面的任务就是让你的写作流程规范化的细节。请耐心阅读。</strong>
                      </p>
                    </div>
                    <h2 id="标签插件"><a href="#标签插件" class="headerlink"
                                                                                                      title="标签插件"></a>标签插件
                    </h2>
                    <blockquote>
                      <p>
                        <font color="#aeaeae">从上方跳转过来的朋友，</font><a
                                                                                                        href="#配置资源文件夹"><i
                                                                                                          class="fa fa-hand-o-up"
                                                                                                          aria-hidden="true"></i>&nbsp;点此返回<strong>资源配置文件夹处</strong></a>
                      </p>
                    </blockquote>
                    <p>标签插件是用于在文章中快速插入特定内容的插件。<br>它的在文章中用法一般是这样：<br>
                      <figure class="highlight plain">
                        <table>
                          <tr>
                            <td class="gutter">
                              <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre>
                            </td>
                            <td class="code">
                              <pre><span class="line">&#123;% [某种标签] %&#125;</span><br><span class="line">&lt;你想插入的内容&gt;</span><br><span class="line">&#123;% end[某种标签] %&#125;</span><br></pre>
                            </td>
                          </tr>
                        </table>
                      </figure>
                    </p>
                    <p>或者这样：<br>
                      <figure class="highlight plain">
                        <table>
                          <tr>
                            <td class="gutter">
                              <pre><span class="line">1</span><br></pre>
                            </td>
                            <td class="code">
                              <pre><span class="line">&#123;% [某种标签] &lt;你想插入的内容&gt; %&#125;</span><br></pre>
                            </td>
                          </tr>
                        </table>
                      </figure>
                    </p>
                    <p>
                      用例子说明最快：<br>比如像前面提到的，<strong>用标签插件在文章引用图片</strong>，你只需这样写<br>
                      <figure class="highlight plain">
                        <table>
                          <tr>
                            <td class="gutter">
                              <pre><span class="line">1</span><br></pre>
                            </td>
                            <td class="code">
                              <pre><span class="line">&#123;% asset_img &lt;图片文件名&gt; %&#125;</span><br></pre>
                            </td>
                          </tr>
                        </table>
                      </figure>
                    </p>
                    <p>示例<br>
                      <figure class="highlight plain">
                        <table>
                          <tr>
                            <td class="gutter">
                              <pre><span class="line">1</span><br></pre>
                            </td>
                            <td class="code">
                              <pre><span class="line">&#123;% asset_img caonima.jpg %&#125;</span><br></pre>
                            </td>
                          </tr>
                        </table>
                      </figure>
                    </p>
                    <p>
                      这是我最常用的标签了，<code>asset_img</code>，顾名思义，就是图片资源。一般我都用它来插入图片。因为我们在前面配置了
                      <strong>资源文件夹</strong>，所以<code>&lt;图片文件名&gt;</code>这里我们不用输入绝对路径，<strong>只需输入图片文件名</strong>
                      就ok了，<strong>hexo会自动在资源文件夹里寻找你的图片</strong>。</p>
                    <p>
                      你可以在<code>caonima</code>文件夹里放一张图片，然后在<code>caonima.md</code>里用上面的<code>asset_img</code>标签插件来引用它，看看效果。
                    </p>
                    <div class="note info">
                      <p>更多有关标签插件的内容，请参考<a href="https://hexo.io/zh-cn/docs" target="_blank"
                                                                                                        rel="noopener">hexo官方文档</a>中的<a
                                                                                                        href="https://hexo.io/zh-cn/docs/tag-plugins.html"
                                                                                                        target="_blank"
                                                                                                        rel="noopener">标签插件</a>部分。
                      </p>
                    </div>
                    <hr>
                    <h1 id="配置主题配置文件"><a href="#配置主题配置文件" class="headerlink"
                                                                                                      title="配置主题配置文件"></a>配置主题配置文件
                    </h1>
                    <p>NexT主题作为hexo众多主题里最火的一款，除了简约美观的设计之外，最重要的一点就是
                      <strong>可定制化的程度高</strong>。你可以很轻松的
                      <strong>开启或关闭某些功能</strong>，甚至
                      <strong>自己尝试添加一些功能</strong>也比其他主题简单，因为它的
                      <strong>源文件组织得很清晰</strong>，主题的
                      <strong>布局</strong>，<strong>js</strong>，<strong>css</strong>，<strong>字体</strong>，<strong>语言</strong>，等文件都独立区分。
                    </p>
                    <p>下面我会参照我的配置来详细介绍如何配置NexT主题。</p>
                    <h2 id="重要更新"><a href="#重要更新" class="headerlink"
                                                                                                      title="重要更新"></a>重要更新
                    </h2>
                    <p>在<span class="label info">v6.0.x</span>的版本里，NexT新增了
                      <strong>缓存</strong>
                      这样一个特性：<br>
                      <figure class="highlight yaml">
                        <table>
                          <tr>
                            <td class="gutter">
                              <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre>
                            </td>
                            <td class="code">
                              <pre><span class="line"><span class="comment"># Allow to cache content generation. Introduced in NexT v6.0.0.</span></span><br><span class="line"><span class="attr">cache:</span></span><br><span class="line"><span class="attr">  enable:</span> <span class="literal">true</span></span><br></pre>
                            </td>
                          </tr>
                        </table>
                      </figure>
                    </p>
                    <p>这是一个非常强大的改进！也就是说，当我们执行了<code>hexo s</code>预览博客内容时，同时对
                      <strong>文章内容</strong> 或
                      <strong>主题配置</strong> 做了一些修改，我们只需 <strong>刷新一下</strong>
                      页面就能实时看到更改效果，而不用重新执行<code>hexo clean &amp;&amp; hexo
                        g</code>来重新生成页面。对此我只能说<span
                                                                                                      class="label default">6</span><span
                                                                                                      class="label primary">6</span><span
                                                                                                      class="label success">6</span><span
                                                                                                      class="label info">6</span><span
                                                                                                      class="label warning">6</span><span
                                                                                                      class="label danger">6</span>
                    </p>
                    <h2 id="网站图标"><a href="#网站图标" class="headerlink"
                                                                                                      title="网站图标"></a>网站图标
                    </h2>
                    <p>下面就是网站图标的配置项：<br>
                      <figure class="highlight yaml">
                        <table>
                          <tr>
                            <td class="gutter">
                              <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre>
                            </td>
                            <td class="code">
                              <pre><span class="line"><span class="comment"># For example, you put your favicons into `hexo-site/source/images` directory.</span></span><br><span class="line"><span class="comment"># Then need to rename &amp; redefine they on any other names, otherwise icons from Next will rewrite your custom icons in Hexo.</span></span><br><span class="line"><span class="attr">favicon:</span></span><br><span class="line"><span class="attr">  small:</span> <span class="string">/images/favicon-16x16-next.png</span></span><br><span class="line"><span class="attr">  medium:</span> <span class="string">/images/favicon-32x32-next.png</span></span><br><span class="line"><span class="attr">  apple_touch_icon:</span> <span class="string">/images/apple-touch-icon-next.png</span></span><br><span class="line"><span class="attr">  safari_pinned_tab:</span> <span class="string">/images/logo.svg</span></span><br><span class="line">  <span class="comment">#android_manifest: /images/manifest.json</span></span><br><span class="line">  <span class="comment">#ms_browserconfig: /images/browserconfig.xml</span></span><br></pre>
                            </td>
                          </tr>
                        </table>
                      </figure>
                    </p>
                    <p>
                      参照注释，先在<code>myblog/source/</code>路径下新建<code>images</code>文件夹，找一张<code>16x16</code>的<code>ico</code>或者<code>png</code>图标，放进<code>images</code>文件夹（在哪里找图标请自行百度），比如<code>caonima.ico</code>。<br>然后将<code>small</code>选项设置为<code>/images/caonima.ico</code>：<br>
                      <figure class="highlight yaml">
                        <table>
                          <tr>
                            <td class="gutter">
                              <pre><span class="line">1</span><br><span class="line">2</span><br></pre>
                            </td>
                            <td class="code">
                              <pre><span class="line"><span class="attr">favicon:</span></span><br><span class="line"><span class="attr">  small:</span> <span class="string">/images/caonima.ico</span></span><br></pre>
                            </td>
                          </tr>
                        </table>
                      </figure>
                    </p>
                    <p>再将其他的选项注释掉（因为基本用不到）：<br>
                      <figure class="highlight yaml">
                        <table>
                          <tr>
                            <td class="gutter">
                              <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre>
                            </td>
                            <td class="code">
                              <pre><span class="line"><span class="attr">favicon:</span></span><br><span class="line"><span class="attr">  small:</span> <span class="string">/images/caonima.ico</span></span><br><span class="line">  <span class="comment">#medium: /images/favicon-32x32-next.png</span></span><br><span class="line">  <span class="comment">#apple_touch_icon: /images/apple-touch-icon-next.png</span></span><br><span class="line">  <span class="comment">#safari_pinned_tab: /images/logo.svg</span></span><br><span class="line">  <span class="comment">#android_manifest: /images/manifest.json</span></span><br><span class="line">  <span class="comment">#ms_browserconfig: /images/browserconfig.xml</span></span><br></pre>
                            </td>
                          </tr>
                        </table>
                      </figure>
                    </p>
                    <p>网站图标配置就完成了。关于其他选项你可以有空自己放些图标文件来玩玩看什么效果。</p>
                    <h2 id="网站底部内容"><a href="#网站底部内容" class="headerlink"
                                                                                                      title="网站底部内容"></a>网站底部内容
                    </h2>
                    <p>这些在<code>footer</code>选项的配置里：<br>
                      <figure class="highlight yaml">
                        <table>
                          <tr>
                            <td class="gutter">
                              <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br></pre>
                            </td>
                            <td class="code">
                              <pre><span class="line"><span class="attr">footer:</span></span><br><span class="line">  <span class="comment"># Specify the date when the site was setup.</span></span><br><span class="line">  <span class="comment"># If not defined, current year will be used.</span></span><br><span class="line">  <span class="comment">#since: 2015</span></span><br><span class="line"></span><br><span class="line">  <span class="comment"># Icon between year and copyright info.</span></span><br><span class="line"><span class="attr">  icon:</span> <span class="string">user</span></span><br><span class="line"></span><br><span class="line">  <span class="comment"># If not defined, will be used `author` from Hexo main config.</span></span><br><span class="line"><span class="attr">  copyright:</span></span><br><span class="line">  <span class="comment"># -------------------------------------------------------------</span></span><br><span class="line">  <span class="comment"># Hexo link (Powered by Hexo).</span></span><br><span class="line"><span class="attr">  powered:</span> <span class="literal">true</span></span><br><span class="line"></span><br><span class="line"><span class="attr">  theme:</span></span><br><span class="line">    <span class="comment"># Theme &amp; scheme info link (Theme - NexT.scheme).</span></span><br><span class="line"><span class="attr">    enable:</span> <span class="literal">true</span></span><br><span class="line">    <span class="comment"># Version info of NexT after scheme info (vX.X.X).</span></span><br><span class="line"><span class="attr">    version:</span> <span class="literal">true</span></span><br><span class="line">  <span class="comment"># -------------------------------------------------------------</span></span><br><span class="line">  <span class="comment"># Any custom text can be defined here.</span></span><br><span class="line">  <span class="comment">#custom_text: Hosted by &lt;a target="_blank" rel="external nofollow" href="https://pages.coding.me"&gt;&lt;b&gt;Coding Pages&lt;/b&gt;&lt;/a&gt;</span></span><br></pre>
                            </td>
                          </tr>
                        </table>
                      </figure>
                    </p>
                    <p>默认图标是<a href="http://www.fontawesome.com.cn/icons/user/" target="_blank"
                                                                                                      rel="noopener"><code>user</code></a>。假如你想个性化的话可以参照<a
                                                                                                      href="http://www.fontawesome.com.cn/"
                                                                                                      target="_blank"
                                                                                                      rel="noopener">fontawsome</a>提供的图标来进行选择。下面是我的配置：<br>
                      <figure class="highlight yaml">
                        <table>
                          <tr>
                            <td class="gutter">
                              <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br></pre>
                            </td>
                            <td class="code">
                              <pre><span class="line"><span class="attr">footer:</span></span><br><span class="line">  <span class="comment"># Specify the date when the site was setup.</span></span><br><span class="line">  <span class="comment"># If not defined, current year will be used.</span></span><br><span class="line"><span class="attr">  since:</span> <span class="number">2017</span></span><br><span class="line"></span><br><span class="line">  <span class="comment"># Icon between year and copyright info.</span></span><br><span class="line"><span class="attr">  icon:</span> <span class="string">cog</span></span><br><span class="line">  <span class="comment"># spiner icon</span></span><br><span class="line"><span class="attr">  rotate:</span> <span class="string">fa-spin</span> <span class="string">fa-lg</span> <span class="string">margin-bottom</span></span><br><span class="line">  <span class="comment">#rotate_plus : fa-plus fa-lg margin-bottom</span></span><br><span class="line"></span><br><span class="line">  <span class="comment"># If not defined, will be used `author` from Hexo main config.</span></span><br><span class="line"><span class="attr">  copyright:</span></span><br><span class="line">  <span class="comment"># -------------------------------------------------------------</span></span><br><span class="line">  <span class="comment"># Hexo link (Powered by Hexo).</span></span><br><span class="line"><span class="attr">  powered:</span> <span class="literal">true</span></span><br><span class="line"></span><br><span class="line"><span class="attr">  theme:</span></span><br><span class="line">    <span class="comment"># Theme &amp; scheme info link (Theme - NexT.scheme).</span></span><br><span class="line"><span class="attr">    enable:</span> <span class="literal">true</span></span><br><span class="line">    <span class="comment"># Version info of NexT after scheme info (vX.X.X).</span></span><br><span class="line"><span class="attr">    version:</span> <span class="literal">true</span></span><br><span class="line">  <span class="comment"># -------------------------------------------------------------</span></span><br><span class="line">  <span class="comment"># Any custom text can be defined here.</span></span><br><span class="line">  <span class="comment">#custom_text: Hosted by &lt;a target="_blank" href="https://pages.github.com"&gt;GitHub Pages&lt;/a&gt;</span></span><br></pre>
                            </td>
                          </tr>
                        </table>
                      </figure>
                    </p>
                    <h2 id="菜单栏设置"><a href="#菜单栏设置" class="headerlink"
                                                                                                      title="菜单栏设置"></a>菜单栏设置
                    </h2>
                    <p>这些在<code>menu</code>选项里：<br>
                      <figure class="highlight yaml">
                        <table>
                          <tr>
                            <td class="gutter">
                              <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br></pre>
                            </td>
                            <td class="code">
                              <pre><span class="line"><span class="comment"># ---------------------------------------------------------------</span></span><br><span class="line"><span class="comment"># Menu Settings</span></span><br><span class="line"><span class="comment"># ---------------------------------------------------------------</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># When running the site in a subdirectory (e.g. domain.tld/blog), remove the leading slash from link value (/archives -&gt; archives).</span></span><br><span class="line"><span class="comment"># Usage: `Key: /link/ || icon`</span></span><br><span class="line"><span class="comment"># Key is the name of menu item. If translate for this menu will find in languages - this translate will be loaded; if not - Key name will be used. Key is case-senstive.</span></span><br><span class="line"><span class="comment"># Value before `||` delimeter is the target link.</span></span><br><span class="line"><span class="comment"># Value after `||` delimeter is the name of FontAwesome icon. If icon (with or without delimeter) is not specified, question icon will be loaded.</span></span><br><span class="line"><span class="attr">menu:</span></span><br><span class="line"><span class="attr">  home:</span> <span class="string">/</span> <span class="string">||</span> <span class="string">home</span></span><br><span class="line">  <span class="comment">#about: /about/ || user</span></span><br><span class="line">  <span class="comment">#tags: /tags/ || tags</span></span><br><span class="line">  <span class="comment">#categories: /categories/ || th</span></span><br><span class="line"><span class="attr">  archives:</span> <span class="string">/archives/</span> <span class="string">||</span> <span class="string">archive</span></span><br><span class="line">  <span class="comment">#schedule: /schedule/ || calendar</span></span><br><span class="line">  <span class="comment">#sitemap: /sitemap.xml || sitemap</span></span><br><span class="line">  <span class="comment">#commonweal: /404/ || heartbeat</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># Enable/Disable menu icons / item badges.</span></span><br><span class="line"><span class="attr">menu_settings:</span></span><br><span class="line"><span class="attr">  icons:</span> <span class="literal">true</span></span><br><span class="line"><span class="attr">  badges:</span> <span class="literal">false</span></span><br></pre>
                            </td>
                          </tr>
                        </table>
                      </figure>
                    </p>
                    <p><code>||</code>后面的<code>icon</code>对应的是<a href="http://www.fontawesome.com.cn/" target="_blank"
                                                                                                      rel="noopener">fontawsome</a>相应的图标名。如果你想添加<code>about</code>菜单的话，按照以下步骤：
                    </p>
                    <ul>
                      <li>在<code>myblog</code>下新建<code>about</code>文件夹</li>
                      <li>在<code>about</code>文件夹下新增<code>index.md</code>文件</li>
                      <li>在<code>index.md</code>里添加内容</li>
                      <li>在<code>menu</code>选项里添加<code>about: /about/ ||
                          user</code></li>
                    </ul>
                    <p>刷新一下看看效果。你会发现多了一个<code>about</code>菜单。用这样的办法可以自定义很多菜单目录。
                    </p>
                    <h2 id="主题布局"><a href="#主题布局" class="headerlink"
                                                                                                      title="主题布局"></a>主题布局
                    </h2>
                    <p>NexT主题提供了4种不同风格的主题布局，按需设置：<br>
                      <figure class="highlight yaml">
                        <table>
                          <tr>
                            <td class="gutter">
                              <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre>
                            </td>
                            <td class="code">
                              <pre><span class="line"><span class="comment"># ---------------------------------------------------------------</span></span><br><span class="line"><span class="comment"># Scheme Settings</span></span><br><span class="line"><span class="comment"># ---------------------------------------------------------------</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># Schemes</span></span><br><span class="line"><span class="attr">scheme:</span> <span class="string">Muse</span></span><br><span class="line"><span class="comment">#scheme: Mist</span></span><br><span class="line"><span class="comment">#scheme: Pisces</span></span><br><span class="line"><span class="comment">#scheme: Gemini</span></span><br></pre>
                            </td>
                          </tr>
                        </table>
                      </figure>
                    </p>
                    <h2 id="侧边栏设置"><a href="#侧边栏设置" class="headerlink"
                                                                                                      title="侧边栏设置"></a>侧边栏设置
                    </h2>
                    <p>这一项的内容有点多，先放配置文件，我们一个个看：<br>
                      <figure class="highlight yaml">
                        <table>
                          <tr>
                            <td class="gutter">
                              <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br></pre>
                            </td>
                            <td class="code">
                              <pre><span class="line"><span class="comment"># ---------------------------------------------------------------</span></span><br><span class="line"><span class="comment"># Sidebar Settings</span></span><br><span class="line"><span class="comment"># ---------------------------------------------------------------</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># Posts / Categories / Tags in sidebar.</span></span><br><span class="line"><span class="attr">site_state:</span> <span class="literal">true</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># Social Links.</span></span><br><span class="line"><span class="comment"># Usage: `Key: permalink || icon`</span></span><br><span class="line"><span class="comment"># Key is the link label showing to end users.</span></span><br><span class="line"><span class="comment"># Value before `||` delimeter is the target permalink.</span></span><br><span class="line"><span class="comment"># Value after `||` delimeter is the name of FontAwesome icon. If icon (with or without delimeter) is not specified, globe icon will be loaded.</span></span><br><span class="line"><span class="comment">#social:</span></span><br><span class="line">  <span class="comment">#GitHub: https://github.com/yourname || github</span></span><br><span class="line">  <span class="comment">#E-Mail: mailto:yourname@gmail.com || envelope</span></span><br><span class="line">  <span class="comment">#Google: https://plus.google.com/yourname || google</span></span><br><span class="line">  <span class="comment">#Twitter: https://twitter.com/yourname || twitter</span></span><br><span class="line">  <span class="comment">#FB Page: https://www.facebook.com/yourname || facebook</span></span><br><span class="line">  <span class="comment">#VK Group: https://vk.com/yourname || vk</span></span><br><span class="line">  <span class="comment">#StackOverflow: https://stackoverflow.com/yourname || stack-overflow</span></span><br><span class="line">  <span class="comment">#YouTube: https://youtube.com/yourname || youtube</span></span><br><span class="line">  <span class="comment">#Instagram: https://instagram.com/yourname || instagram</span></span><br><span class="line">  <span class="comment">#Skype: skype:yourname?call|chat || skype</span></span><br><span class="line"></span><br><span class="line"><span class="attr">social_icons:</span></span><br><span class="line"><span class="attr">  enable:</span> <span class="literal">true</span></span><br><span class="line"><span class="attr">  icons_only:</span> <span class="literal">false</span></span><br><span class="line"><span class="attr">  transition:</span> <span class="literal">false</span></span><br><span class="line">  <span class="comment"># Dependencies: exturl: true in Tags Settings section below.</span></span><br><span class="line">  <span class="comment"># To encrypt links above use https://www.base64encode.org</span></span><br><span class="line">  <span class="comment"># Example encoded link: `GitHub: aHR0cHM6Ly9naXRodWIuY29tL3RoZW1lLW5leHQ= || github`</span></span><br><span class="line"><span class="attr">  exturl:</span> <span class="literal">false</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># Follow me on GitHub banner in right-top corner.</span></span><br><span class="line"><span class="comment"># Usage: `permalink || title`</span></span><br><span class="line"><span class="comment"># Value before `||` delimeter is the target permalink.</span></span><br><span class="line"><span class="comment"># Value after `||` delimeter is the title and aria-label name.</span></span><br><span class="line"><span class="comment">#github_banner: https://github.com/yourname || Follow me on GitHub</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># Blog rolls</span></span><br><span class="line"><span class="attr">links_icon:</span> <span class="string">link</span></span><br><span class="line"><span class="attr">links_title:</span> <span class="string">Links</span></span><br><span class="line"><span class="attr">links_layout:</span> <span class="string">block</span></span><br><span class="line"><span class="comment">#links_layout: inline</span></span><br><span class="line"><span class="comment">#links:</span></span><br><span class="line">  <span class="comment">#Title: http://example.com/</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># Sidebar Avatar</span></span><br><span class="line"><span class="attr">avatar:</span></span><br><span class="line">  <span class="comment"># in theme directory(source/images): /images/avatar.gif</span></span><br><span class="line">  <span class="comment"># in site  directory(source/uploads): /uploads/avatar.gif</span></span><br><span class="line">  <span class="comment"># You can also use other linking images.</span></span><br><span class="line"><span class="attr">  url:</span> <span class="comment">#/images/avatar.gif</span></span><br><span class="line">  <span class="comment"># If true, the avatar would be dispalyed in circle. </span></span><br><span class="line"><span class="attr">  rounded:</span> <span class="literal">false</span></span><br><span class="line">  <span class="comment"># The value of opacity should be choose from 0 to 1 to set the opacity of the avatar.</span></span><br><span class="line"><span class="attr">  opacity:</span> <span class="number">1</span></span><br><span class="line">  <span class="comment"># If true, the avatar would be rotated with the cursor.</span></span><br><span class="line"><span class="attr">  rotated:</span> <span class="literal">false</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># Table Of Contents in the Sidebar</span></span><br><span class="line"><span class="attr">toc:</span></span><br><span class="line"><span class="attr">  enable:</span> <span class="literal">true</span></span><br><span class="line"></span><br><span class="line">  <span class="comment"># Automatically add list number to toc.</span></span><br><span class="line"><span class="attr">  number:</span> <span class="literal">true</span></span><br><span class="line"></span><br><span class="line">  <span class="comment"># If true, all words will placed on next lines if header width longer then sidebar width.</span></span><br><span class="line"><span class="attr">  wrap:</span> <span class="literal">false</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># Creative Commons 4.0 International License.</span></span><br><span class="line"><span class="comment"># http://creativecommons.org/</span></span><br><span class="line"><span class="comment"># Available: by | by-nc | by-nc-nd | by-nc-sa | by-nd | by-sa | zero</span></span><br><span class="line"><span class="comment">#creative_commons: by-nc-sa</span></span><br><span class="line"><span class="comment">#creative_commons:</span></span><br><span class="line"></span><br><span class="line"><span class="attr">sidebar:</span></span><br><span class="line">  <span class="comment"># Sidebar Position, available value: left | right (only for Pisces | Gemini).</span></span><br><span class="line"><span class="attr">  position:</span> <span class="string">left</span></span><br><span class="line">  <span class="comment">#position: right</span></span><br><span class="line"></span><br><span class="line">  <span class="comment"># Sidebar Display, available value (only for Muse | Mist):</span></span><br><span class="line">  <span class="comment">#  - post    expand on posts automatically. Default.</span></span><br><span class="line">  <span class="comment">#  - always  expand for all pages automatically</span></span><br><span class="line">  <span class="comment">#  - hide    expand only when click on the sidebar toggle icon.</span></span><br><span class="line">  <span class="comment">#  - remove  Totally remove sidebar including sidebar toggle.</span></span><br><span class="line"><span class="attr">  display:</span> <span class="string">post</span></span><br><span class="line">  <span class="comment">#display: always</span></span><br><span class="line">  <span class="comment">#display: hide</span></span><br><span class="line">  <span class="comment">#display: remove</span></span><br><span class="line"></span><br><span class="line">  <span class="comment"># Sidebar offset from top menubar in pixels (only for Pisces | Gemini).</span></span><br><span class="line"><span class="attr">  offset:</span> <span class="number">12</span></span><br><span class="line"></span><br><span class="line">  <span class="comment"># Back to top in sidebar (only for Pisces | Gemini).</span></span><br><span class="line"><span class="attr">  b2t:</span> <span class="literal">false</span></span><br><span class="line"></span><br><span class="line">  <span class="comment"># Scroll percent label in b2t button.</span></span><br><span class="line"><span class="attr">  scrollpercent:</span> <span class="literal">false</span></span><br><span class="line"></span><br><span class="line">  <span class="comment"># Enable sidebar on narrow view (only for Muse | Mist).</span></span><br><span class="line"><span class="attr">  onmobile:</span> <span class="literal">false</span></span><br></pre>
                            </td>
                          </tr>
                        </table>
                      </figure>
                    </p>
                    <ul>
                      <li><code>social</code>: 这一项被注释掉了，我们先取消注释。配置内容就是对应的社交账号链接。
                      </li>
                      <li><code>github_banner</code>: 右上角的 <strong>follow me on
                          github</strong></li>
                      <li><code>links</code>: 放一些友情链接或其它的你想放的链接</li>
                      <li><code>avatar</code>: 头像的一些设置</li>
                    </ul>
                    <p>其余的设置参考他给出的注释说明配置即可。下面是我的配置：<br>
                      <figure class="highlight yaml">
                        <table>
                          <tr>
                            <td class="gutter">
                              <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br></pre>
                            </td>
                            <td class="code">
                              <pre><span class="line"><span class="comment"># ---------------------------------------------------------------</span></span><br><span class="line"><span class="comment"># Sidebar Settings</span></span><br><span class="line"><span class="comment"># ---------------------------------------------------------------</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># Posts / Categories / Tags in sidebar.</span></span><br><span class="line"><span class="attr">site_state:</span> <span class="literal">true</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># Social Links.</span></span><br><span class="line"><span class="comment"># Usage: `Key: permalink || icon`</span></span><br><span class="line"><span class="comment"># Key is the link label showing to end users.</span></span><br><span class="line"><span class="comment"># Value before `||` delimeter is the target permalink.</span></span><br><span class="line"><span class="comment"># Value after `||` delimeter is the name of FontAwesome icon. If icon (with or without delimeter) is not specified, globe icon will be loaded.</span></span><br><span class="line"><span class="attr">social:</span></span><br><span class="line"><span class="attr">  GitHub:</span> <span class="attr">https://github.com/tankeryang</span> <span class="string">||</span> <span class="string">github</span></span><br><span class="line"><span class="attr">  E-Mail:</span> <span class="attr">mailto:youngzyang@outlook.com</span> <span class="string">||</span> <span class="string">envelope</span></span><br><span class="line">  <span class="comment">#Google: https://plus.google.com/yourname || google</span></span><br><span class="line">  <span class="comment">#Twitter: https://twitter.com/yourname || twitter</span></span><br><span class="line">  <span class="comment">#FB Page: https://www.facebook.com/yourname || facebook</span></span><br><span class="line">  <span class="comment">#VK Group: https://vk.com/yourname || vk</span></span><br><span class="line">  <span class="comment">#StackOverflow: https://stackoverflow.com/yourname || stack-overflow</span></span><br><span class="line">  <span class="comment">#YouTube: https://youtube.com/yourname || youtube</span></span><br><span class="line">  <span class="comment">#Instagram: https://instagram.com/yourname || instagram</span></span><br><span class="line">  <span class="comment">#Skype: skype:yourname?call|chat || skype</span></span><br><span class="line"></span><br><span class="line"><span class="attr">social_icons:</span></span><br><span class="line"><span class="attr">  enable:</span> <span class="literal">true</span></span><br><span class="line"><span class="attr">  icons_only:</span> <span class="literal">false</span></span><br><span class="line"><span class="attr">  transition:</span> <span class="literal">true</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># Follow me on GitHub banner in right-top corner.</span></span><br><span class="line"><span class="comment"># Usage: `permalink || title`</span></span><br><span class="line"><span class="comment"># Value before `||` delimeter is the target permalink.</span></span><br><span class="line"><span class="comment"># Value after `||` delimeter is the title and aria-label name.</span></span><br><span class="line"><span class="attr">github_banner:</span> <span class="attr">https://github.com/tankeryang</span> <span class="string">||</span> <span class="string">Follow</span> <span class="string">me</span> <span class="string">on</span> <span class="string">GitHub</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># Blog rolls</span></span><br><span class="line"><span class="attr">links_icon:</span> <span class="string">link</span></span><br><span class="line"><span class="attr">links_title:</span> <span class="string">博客镜像</span> <span class="string">&amp;</span> <span class="string">友情链接</span></span><br><span class="line"><span class="attr">links_layout:</span> <span class="string">block</span></span><br><span class="line"><span class="comment">#links_layout: inline</span></span><br><span class="line"><span class="attr">links:</span></span><br><span class="line">  <span class="string">淦</span> <span class="bullet">-</span> <span class="attr">github:</span> <span class="attr">https://tankeryang.github.io</span></span><br><span class="line">  <span class="string">淦</span> <span class="bullet">-</span> <span class="attr">coding:</span> <span class="attr">https://tankeryang.coding.me</span></span><br><span class="line">  <span class="string">淦</span> <span class="bullet">-</span> <span class="attr">gitee:</span> <span class="attr">http://tankeryang.gitee.io</span></span><br><span class="line">  <span class="string">未知:</span> <span class="attr">https://deeeeeeeee.github.io</span></span><br><span class="line">  <span class="string">简单可依赖:</span> <span class="attr">https://www.tiexo.cn/</span></span><br><span class="line">  <span class="string">刘伟的博客:</span> <span class="attr">https://darrenliuwei.com</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># Sidebar Avatar</span></span><br><span class="line"><span class="comment"># in theme directory(source/images): /images/avatar.gif</span></span><br><span class="line"><span class="comment"># in site  directory(source/uploads): /uploads/avatar.gif</span></span><br><span class="line"><span class="attr">avatar:</span> </span><br><span class="line"><span class="attr">  url:</span> <span class="string">/uploads/my.jpg</span></span><br><span class="line"><span class="attr">  rounded:</span> <span class="literal">true</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># Table Of Contents in the Sidebar</span></span><br><span class="line"><span class="attr">toc:</span></span><br><span class="line"><span class="attr">  enable:</span> <span class="literal">true</span></span><br><span class="line"></span><br><span class="line">  <span class="comment"># Automatically add list number to toc.</span></span><br><span class="line"><span class="attr">  number:</span> <span class="literal">true</span></span><br><span class="line"></span><br><span class="line">  <span class="comment"># If true, all words will placed on next lines if header width longer then sidebar width.</span></span><br><span class="line"><span class="attr">  wrap:</span> <span class="literal">false</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># Creative Commons 4.0 International License.</span></span><br><span class="line"><span class="comment"># http://creativecommons.org/</span></span><br><span class="line"><span class="comment"># Available: by | by-nc | by-nc-nd | by-nc-sa | by-nd | by-sa | zero</span></span><br><span class="line"><span class="attr">creative_commons:</span> <span class="string">by-nc-sa</span></span><br><span class="line"><span class="comment">#creative_commons:</span></span><br><span class="line"></span><br><span class="line"><span class="attr">sidebar:</span></span><br><span class="line">  <span class="comment"># Sidebar Position, available value: left | right (only for Pisces | Gemini).</span></span><br><span class="line"><span class="attr">  position:</span> <span class="string">left</span></span><br><span class="line">  <span class="comment">#position: right</span></span><br><span class="line"></span><br><span class="line">  <span class="comment"># Sidebar Display, available value (only for Muse | Mist):</span></span><br><span class="line">  <span class="comment">#  - post    expand on posts automatically. Default.</span></span><br><span class="line">  <span class="comment">#  - always  expand for all pages automatically</span></span><br><span class="line">  <span class="comment">#  - hide    expand only when click on the sidebar toggle icon.</span></span><br><span class="line">  <span class="comment">#  - remove  Totally remove sidebar including sidebar toggle.</span></span><br><span class="line">  <span class="comment">#display: post</span></span><br><span class="line"><span class="attr">  display:</span> <span class="string">always</span></span><br><span class="line">  <span class="comment">#display: hide</span></span><br><span class="line">  <span class="comment">#display: remove</span></span><br><span class="line"></span><br><span class="line">  <span class="comment"># Sidebar offset from top menubar in pixels (only for Pisces | Gemini).</span></span><br><span class="line"><span class="attr">  offset:</span> <span class="number">12</span></span><br><span class="line"></span><br><span class="line">  <span class="comment"># Back to top in sidebar (only for Pisces | Gemini).</span></span><br><span class="line"><span class="attr">  b2t:</span> <span class="literal">true</span></span><br><span class="line"></span><br><span class="line">  <span class="comment"># Scroll percent label in b2t button.</span></span><br><span class="line"><span class="attr">  scrollpercent:</span> <span class="literal">true</span></span><br><span class="line"></span><br><span class="line">  <span class="comment"># Enable sidebar on narrow view (only for Muse | Mist).</span></span><br><span class="line"><span class="attr">  onmobile:</span> <span class="literal">true</span></span><br></pre>
                            </td>
                          </tr>
                        </table>
                      </figure>
                    </p>
                    <h2 id="个性化设置"><a href="#个性化设置" class="headerlink"
                                                                                                      title="个性化设置"></a>个性化设置
                    </h2>
                    <p>因为NexT可配置的选项太多，在这里我就不一一展开了，下面在介绍两个个性化的设置</p>
                    <h3 id="主题标签插件"><a href="#主题标签插件" class="headerlink"
                                                                                                      title="主题标签插件"></a>主题标签插件
                    </h3>
                    <p>关于标签插件，大家可以回顾一下前面的内容。NexT也自带了一些标签插件供用户使用</p>
                    <h4 id="note"><a href="#note" class="headerlink"
                                                                                                      title="note"></a>note
                    </h4>
                    <div class="note default">
                      <p>提示块标签，效果就像你看到的这个提示块</p>
                    </div>
                    <p>配置如下：<br>
                      <figure class="highlight yaml">
                        <table>
                          <tr>
                            <td class="gutter">
                              <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre>
                            </td>
                            <td class="code">
                              <pre><span class="line"><span class="comment"># Note tag (bs-callout).</span></span><br><span class="line"><span class="attr">note:</span></span><br><span class="line">  <span class="comment"># Note tag style values:</span></span><br><span class="line">  <span class="comment">#  - simple    bs-callout old alert style. Default.</span></span><br><span class="line">  <span class="comment">#  - modern    bs-callout new (v2-v3) alert style.</span></span><br><span class="line">  <span class="comment">#  - flat      flat callout style with background, like on Mozilla or StackOverflow.</span></span><br><span class="line">  <span class="comment">#  - disabled  disable all CSS styles import of note tag.</span></span><br><span class="line"><span class="attr">  style:</span> <span class="string">flat</span></span><br><span class="line"><span class="attr">  icons:</span> <span class="literal">true</span></span><br><span class="line"><span class="attr">  border_radius:</span> <span class="number">2</span></span><br><span class="line">  <span class="comment"># Offset lighter of background in % for modern and flat styles (modern: -12 | 12; flat: -18 | 6).</span></span><br><span class="line">  <span class="comment"># Offset also applied to label tag variables. This option can work with disabled note tag.</span></span><br><span class="line"><span class="attr">  light_bg_offset:</span> <span class="number">3</span></span><br></pre>
                            </td>
                          </tr>
                        </table>
                      </figure>
                    </p>
                    <p>使用方法：<br>
                      <figure class="highlight plain">
                        <table>
                          <tr>
                            <td class="gutter">
                              <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre>
                            </td>
                            <td class="code">
                              <pre><span class="line">&#123;% note class %&#125;</span><br><span class="line">Any content (support inline tags too).</span><br><span class="line">&#123;% endnote %&#125;</span><br><span class="line"></span><br><span class="line"># 支持的class: class : default | primary | success | info | warning | danger.</span><br></pre>
                            </td>
                          </tr>
                        </table>
                      </figure>
                    </p>
                    <h4 id="label"><a href="#label" class="headerlink"
                                                                                                      title="label"></a>label
                    </h4>
                    <span class="label primary">label标签，给文字加底色</span>
                    <p>配置如下：<br>
                      <figure class="highlight plain">
                        <table>
                          <tr>
                            <td class="gutter">
                              <pre><span class="line">1</span><br><span class="line">2</span><br></pre>
                            </td>
                            <td class="code">
                              <pre><span class="line"># Label tag.</span><br><span class="line">label: true</span><br></pre>
                            </td>
                          </tr>
                        </table>
                      </figure>
                    </p>
                    <p>使用方法：<br>
                      <figure class="highlight plain">
                        <table>
                          <tr>
                            <td class="gutter">
                              <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre>
                            </td>
                            <td class="code">
                              <pre><span class="line">&#123;% label class@Text %&#125;</span><br><span class="line"></span><br><span class="line"># 支持的class : default | primary | success | info | warning | danger.</span><br></pre>
                            </td>
                          </tr>
                        </table>
                      </figure>
                    </p>
                    <h4 id="选项卡"><a href="#选项卡" class="headerlink"
                                                                                                      title="选项卡"></a>选项卡
                    </h4>
                    <p>效果如下：<br>
                      <div class="tabs" id="选项卡1-选项卡2">
                        <ul class="nav-tabs">
                          <li class="tab active"><a href="#选项卡1-选项卡2-1">选项卡1</a>
                          </li>
                          <li class="tab"><a href="#选项卡1-选项卡2-2">选项卡2</a></li>
                        </ul>
                        <div class="tab-content">
                          <div class="tab-pane active" id="选项卡1-选项卡2-1">
                            <p>我是选项卡1</p>
                            <figure class="highlight plain">
                              <table>
                                <tr>
                                  <td class="gutter">
                                    <pre><span class="line">1</span><br></pre>
                                  </td>
                                  <td class="code">
                                    <pre><span class="line">我是代码框1</span><br></pre>
                                  </td>
                                </tr>
                              </table>
                            </figure>
                          </div>
                          <div class="tab-pane" id="选项卡1-选项卡2-2">
                            <p>我是选项卡2</p>
                            <figure class="highlight plain">
                              <table>
                                <tr>
                                  <td class="gutter">
                                    <pre><span class="line">1</span><br></pre>
                                  </td>
                                  <td class="code">
                                    <pre><span class="line">我是代码框2</span><br></pre>
                                  </td>
                                </tr>
                              </table>
                            </figure>
                          </div>
                        </div>
                      </div><br>配置如下：<br>
                      <figure class="highlight yaml">
                        <table>
                          <tr>
                            <td class="gutter">
                              <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre>
                            </td>
                            <td class="code">
                              <pre><span class="line"><span class="comment"># Tabs tag.</span></span><br><span class="line"><span class="attr">tabs:</span></span><br><span class="line"><span class="attr">  enable:</span> <span class="literal">true</span></span><br><span class="line"><span class="attr">  transition:</span></span><br><span class="line"><span class="attr">    tabs:</span> <span class="literal">true</span></span><br><span class="line"><span class="attr">    labels:</span> <span class="literal">true</span></span><br><span class="line"><span class="attr">  border_radius:</span> <span class="number">3</span></span><br></pre>
                            </td>
                          </tr>
                        </table>
                      </figure>
                    </p>
                    <p>使用方法：<br>
                      <figure class="highlight plain">
                        <table>
                          <tr>
                            <td class="gutter">
                              <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br></pre>
                            </td>
                            <td class="code">
                              <pre><span class="line">&#123;% tabs 选项卡1 选项卡2 %&#125;</span><br><span class="line">&lt;!-- tab 选项卡1 --&gt;</span><br><span class="line">我是选项卡1</span><br><span class="line">&#123;% codeblock %&#125;</span><br><span class="line">我是代码框1</span><br><span class="line">&#123;% endcodeblock %&#125;</span><br><span class="line"> &lt;!-- endtab --&gt;</span><br><span class="line"></span><br><span class="line"> &lt;!-- tab 选项卡2 --&gt;</span><br><span class="line">我是选项卡2</span><br><span class="line">&#123;% codeblock %&#125;</span><br><span class="line">我是代码框2</span><br><span class="line">&#123;% endcodeblock %&#125;</span><br><span class="line"> &lt;!-- endtab --&gt;</span><br><span class="line">&#123;% endtabs %&#125;</span><br></pre>
                            </td>
                          </tr>
                        </table>
                      </figure>
                    </p>
                    <div class="note info">
                      <p>更多设置请参考<span class="label danger">v5.x</span>版本的<a href="http://theme-next.iissnan.com/"
                                                                                                        target="_blank"
                                                                                                        rel="noopener">NexT文档</a>和最新的<span
                                                                                                        class="label primary">v6.x</span>版本的<a
                                                                                                        href="https://github.com/theme-next/hexo-theme-next/tree/master/docs/zh-CN"
                                                                                                        target="_blank"
                                                                                                        rel="noopener">NexT文档</a>
                      </p>
                    </div>
                    <hr>
                    <h1 id="配置Git与Travic-CI持续集成"><a href="#配置Git与Travic-CI持续集成" class="headerlink"
                                                                                                      title="配置Git与Travic-CI持续集成"></a>配置Git与Travic-CI持续集成
                    </h1>
                    <div class="note warning">
                      <p>这一步是最能体现 <strong>自动化博客写作流程</strong> 的关键。务必仔细阅读。</p>
                    </div>
                    <h2 id="github，gitee，coding新建博客项目"><a href="#github，gitee，coding新建博客项目" class="headerlink"
                                                                                                      title="github，gitee，coding新建博客项目"></a>github，gitee，coding新建博客项目
                    </h2>
                    <p>在github上新开一个repo，<strong>repo名:
                        <code>USERNAME.github.io</code></strong><br>同理，<strong>coding
                        repo名:
                        <code>USERNAME</code></strong>， <strong>gitee repo名:
                        <code>USERNAME</code></strong></p>
                    <blockquote>
                      <p>
                        <code>USERNAME</code>为你的github，gitee，coding用户名<br>pages服务参考：<a href="https://pages.github.com/"
                                                                                                        target="_blank"
                                                                                                        rel="noopener">github</a>，<a
                                                                                                        href="https://coding.net/help/doc/pages/creating-pages.html"
                                                                                                        target="_blank"
                                                                                                        rel="noopener">coding</a>，<a
                                                                                                        href="http://git.mydoc.io/?t=154714"
                                                                                                        target="_blank"
                                                                                                        rel="noopener">gitee</a>
                      </p>
                    </blockquote>
                    <h2 id="添加-gitignore"><a href="#添加-gitignore" class="headerlink"
                                                                                                      title="添加.gitignore"></a>添加.gitignore
                    </h2>
                    <p>进入<span class="label default">myblog</span>文件夹，新增<span
                                                                                                      class="label default">.gitignore</span>文件，若存在则检查是否与如下一致：<br>
                      <figure class="highlight plain">
                        <figcaption><span>.gitignore</span></figcaption>
                        <table>
                          <tr>
                            <td class="gutter">
                              <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre>
                            </td>
                            <td class="code">
                              <pre><span class="line">.DS_Store</span><br><span class="line">Thumbs.db</span><br><span class="line">db.json</span><br><span class="line">*.log</span><br><span class="line">node_modules/</span><br><span class="line">public/</span><br><span class="line">.deploy*/</span><br></pre>
                            </td>
                          </tr>
                        </table>
                      </figure>
                    </p>
                    <h2 id="设置travis关联USERNAME-github-io"><a href="#设置travis关联USERNAME-github-io" class="headerlink"
                                                                                                      title="设置travis关联USERNAME.github.io"></a>设置travis关联USERNAME.github.io
                    </h2>
                    <ul>
                      <li>
                        <p>先用github账号登陆<a href="https://www.travis-ci.org/" target="_blank"
                                                                                                          rel="noopener">travis</a>
                        </p>
                      </li>
                      <li>
                        <p>勾选你的博客项目，顺便点旁边的<span
                                                                                                          class="label primary">setting</span>进入设置，参照图2来勾选：
                        </p>
                        <img
                                                                                                        src="/posts/Hexo%20+%20NexT%20+%20Github%20Pages%20+%20Coding%20Pages%20+%20Gitee%20Pages%20+%20Travis%20全攻略/pic5.png">
                        <img
                                                                                                        src="/posts/Hexo%20+%20NexT%20+%20Github%20Pages%20+%20Coding%20Pages%20+%20Gitee%20Pages%20+%20Travis%20全攻略/pic6.png">
                      </li>
                    </ul>
                    <h2 id="为博客项目设置deploy-key"><a href="#为博客项目设置deploy-key" class="headerlink"
                                                                                                      title="为博客项目设置deploy key"></a>为博客项目设置deploy
                      key</h2>
                    <p>这一步比较重要，这是travis能否访问你的repo的关键。按照下面的步骤配置：</p>
                    <ul>
                      <li>
                        <p>
                          在<code>myblog</code>下新建一个<code>.travis</code>文件夹，并进入<code>.travis</code>文件夹
                        </p>
                      </li>
                      <li>
                        <p>在<code>myblog/.travis</code>下生成一个专门给travis用的<code>ssh
                            key</code>:<br>执行<code>ssh-keygen -t rsa -f
                            travis_rsa -C
                            &quot;your@email.com&quot;</code>，遇到密码输入直接<code>enter回车</code>，email记得替换
                        </p>
                      </li>
                      <li>
                        <p>
                          github博客项目添加travis_rsa.pub公钥<br>将<code>.travis</code>下的<code>travis_rsa.pub</code>的内容复制，按下图进入<code>Add
                            deploy
                            key</code>界面，将内容粘贴，<strong>并勾选可读写权限（一定不要遗漏!!!）</strong>
                        </p>
                        <img
                                                                                                        src="/posts/Hexo%20+%20NexT%20+%20Github%20Pages%20+%20Coding%20Pages%20+%20Gitee%20Pages%20+%20Travis%20全攻略/pic7.png">
                      </li>
                      <li>
                        <p>coding过程同上</p>
                      </li>
                      <li>
                        <p>gitee因为项目的<code>deploy
                            key</code>不能设置可写入权限，所以只能将<code>travis_rsa.pub</code>添加到个人的公钥
                        </p>
                      </li>
                    </ul>
                    <h2 id="加密travis-rsa"><a href="#加密travis-rsa" class="headerlink"
                                                                                                      title="加密travis_rsa"></a>加密travis_rsa
                    </h2>
                    <ul>
                      <li>
                        <p>先安装<a href="https://rubygems.org/" target="_blank"
                                                                                                          rel="noopener">gem</a>（关于ruby，gem相关的安装这里就不列出来了，我相信你的动手能力:)）
                        </p>
                      </li>
                      <li>
                        <p>接着安装travis命令行工具: <code>sudo gem install travis</code>
                        </p>
                      </li>
                      <li>
                        <p>装好后，进入<code>myblog/.travis</code>文件夹，在当前路径下执行如下命令：
                        </p>
                        <figure class="highlight sh">
                          <table>
                            <tr>
                              <td class="gutter">
                                <pre><span class="line">1</span><br><span class="line">2</span><br></pre>
                              </td>
                              <td class="code">
                                <pre><span class="line">travis login --auto</span><br><span class="line">travis encrypt-file travis_rsa -add</span><br></pre>
                              </td>
                            </tr>
                          </table>
                        </figure>
                      </li>
                    </ul>
                    <div class="note warning">
                      <p>
                        需要注意的是，travis命令行工具貌似在Windows下不太好使…因此需要换另外的方法使得travis能访问到github，coding和gitee上的博客项目，主要是通过
                        <strong>token</strong> 来访问。相关的配置百度一下就有很多教程，比ssh来的更简单。就是在
                        <strong>安全</strong>
                        性上差了一点，因为 <strong>token</strong> 是有操作所有
                        <strong>repo</strong> 的权限的…</p>
                    </div>
                    <p>
                      加密完成后你会发现<code>.travis</code>文件夹下多了个<code>travis_rsa.enc</code>的文件，这个就是加密后的<code>travis_rsa</code>。同时<code>myblog</code>下也多了<code>.travis.yml</code>文件。下面我们就配置一下<code>.travis.yml</code>。
                    </p>
                    <ul>
                      <li>
                        <p>
                          先将<code>.travis</code>下的<code>travis_rsa</code>，<code>travis_rsa.pub</code>删掉。<strong>请记住一定要删掉！！！只保留加密文件</strong>
                        </p>
                      </li>
                      <li>
                        <p>按照下面配置<code>.travis.yml</code>:</p>
                        <figure class="highlight yaml">
                          <figcaption><span>.travis.yml</span></figcaption>
                          <table>
                            <tr>
                              <td class="gutter">
                                <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br></pre>
                              </td>
                              <td class="code">
                                <pre><span class="line"><span class="attr">language:</span> <span class="string">node_js</span></span><br><span class="line"><span class="attr">node_js:</span> <span class="string">stable</span></span><br><span class="line"></span><br><span class="line"><span class="attr">branches:</span></span><br><span class="line"><span class="attr">  only:</span></span><br><span class="line"><span class="bullet">  -</span> <span class="string">dev</span></span><br><span class="line"></span><br><span class="line"><span class="attr">before_install:</span></span><br><span class="line"><span class="comment"># 解密SSH</span></span><br><span class="line"><span class="comment"># encrypted_key和encrypted_id可以在travis里setting查看，具体位置参考下图</span></span><br><span class="line"><span class="bullet">-</span> <span class="string">openssl</span> <span class="string">aes-256-cbc</span> <span class="bullet">-K</span> <span class="string">$&#123;你的encrypted_xxxx_key&#125;</span> <span class="bullet">-iv</span> <span class="string">$&#123;你的encrypted_xxxx_iv&#125;</span></span><br><span class="line"><span class="bullet">  -</span><span class="string">in</span> <span class="string">.travis/travis_rsa.enc</span> <span class="bullet">-out</span> <span class="string">~/.ssh/travis_rsa</span> <span class="bullet">-d</span></span><br><span class="line"><span class="bullet">-</span> <span class="string">chmod</span> <span class="number">600</span> <span class="string">~/.ssh/travis_rsa</span></span><br><span class="line"><span class="bullet">-</span> <span class="string">mv</span> <span class="bullet">-fv</span> <span class="string">.travis/config</span> <span class="string">~/.ssh/config</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 安装hexo以及一些插件，没用到的可移除相关命令</span></span><br><span class="line"><span class="attr">install:</span></span><br><span class="line"><span class="bullet">-</span> <span class="string">npm</span> <span class="string">install</span> <span class="string">hexo-cli</span> <span class="bullet">-g</span></span><br><span class="line"><span class="bullet">-</span> <span class="string">npm</span> <span class="string">install</span> <span class="string">hexo-math</span> <span class="bullet">--save</span></span><br><span class="line"><span class="bullet">-</span> <span class="string">npm</span> <span class="string">install</span> <span class="string">hexo-generator-searchdb</span> <span class="bullet">--save</span></span><br><span class="line"><span class="bullet">-</span> <span class="string">npm</span> <span class="string">install</span> <span class="string">hexo-symbols-count-time</span> <span class="bullet">--save</span></span><br><span class="line"><span class="bullet">-</span> <span class="string">npm</span> <span class="string">install</span> <span class="string">hexo-generator-feed</span> <span class="bullet">--save</span></span><br><span class="line"><span class="bullet">-</span> <span class="string">npm</span> <span class="string">install</span> <span class="string">hexo-wordcount</span> <span class="bullet">--save</span></span><br><span class="line"><span class="bullet">-</span> <span class="string">npm</span> <span class="string">install</span> <span class="string">mermaid</span> <span class="bullet">--save</span></span><br><span class="line"><span class="bullet">-</span> <span class="string">npm</span> <span class="string">install</span> <span class="string">hexo-tag-mermaid</span> <span class="bullet">--save</span></span><br><span class="line"><span class="bullet">-</span> <span class="string">npm</span> <span class="string">install</span> <span class="string">hexo-tag-plantuml</span> <span class="bullet">--save</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 安装next主题插件，没用到的可移除相关命令</span></span><br><span class="line"><span class="attr">before_script:</span></span><br><span class="line"><span class="bullet">-</span> <span class="string">cd</span> <span class="string">./themes/next</span></span><br><span class="line"><span class="bullet">-</span> <span class="string">git</span> <span class="string">clone</span> <span class="attr">https://github.com/theme-next/theme-next-fancybox3</span> <span class="string">source/lib/fancybox</span></span><br><span class="line"><span class="bullet">-</span> <span class="string">git</span> <span class="string">clone</span> <span class="attr">https://github.com/theme-next/theme-next-jquery-lazyload</span> <span class="string">source/lib/jquery_lazyload</span></span><br><span class="line"><span class="bullet">-</span> <span class="string">git</span> <span class="string">clone</span> <span class="attr">https://github.com/theme-next/theme-next-needmoreshare2</span> <span class="string">source/lib/needsharebutton</span></span><br><span class="line"><span class="bullet">-</span> <span class="string">git</span> <span class="string">clone</span> <span class="attr">https://github.com/theme-next/theme-next-pace</span> <span class="string">source/lib/pace</span></span><br><span class="line"><span class="bullet">-</span> <span class="string">git</span> <span class="string">clone</span> <span class="attr">https://github.com/theme-next/theme-next-pangu.git</span> <span class="string">source/lib/pangu</span></span><br><span class="line"><span class="bullet">-</span> <span class="string">git</span> <span class="string">clone</span> <span class="attr">https://github.com/theme-next/theme-next-reading-progress</span> <span class="string">source/lib/reading_progress</span></span><br><span class="line"><span class="bullet">-</span> <span class="string">cd</span> <span class="string">..</span></span><br><span class="line"><span class="bullet">-</span> <span class="string">cd</span> <span class="string">..</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 构建博客</span></span><br><span class="line"><span class="attr">script:</span></span><br><span class="line"><span class="bullet">-</span> <span class="string">hexo</span> <span class="bullet">-version</span></span><br><span class="line"><span class="bullet">-</span> <span class="string">hexo</span> <span class="string">clean</span> <span class="string">&amp;&amp;</span> <span class="string">hexo</span> <span class="string">g</span></span><br><span class="line"></span><br><span class="line"><span class="attr">after_script:</span></span><br><span class="line"><span class="comment"># 设置环境</span></span><br><span class="line"><span class="bullet">-</span> <span class="string">set</span> <span class="bullet">-ev</span></span><br><span class="line"><span class="bullet">-</span> <span class="string">export</span> <span class="string">TZ='Asia/Shanghai'</span></span><br><span class="line"><span class="bullet">-</span> <span class="string">cd</span> <span class="string">./public</span></span><br><span class="line"><span class="comment"># 提交</span></span><br><span class="line"><span class="bullet">-</span> <span class="string">git</span> <span class="string">config</span> <span class="string">user.name</span> <span class="string">"USERNAME"</span>  <span class="comment"># 你的github用户名</span></span><br><span class="line"><span class="bullet">-</span> <span class="string">git</span> <span class="string">config</span> <span class="string">user.email</span> <span class="string">"your@email.com"</span>  <span class="comment"># 你的github邮箱</span></span><br><span class="line"><span class="bullet">-</span> <span class="string">git</span> <span class="string">init</span></span><br><span class="line"><span class="bullet">-</span> <span class="string">git</span> <span class="string">add</span> <span class="string">.</span></span><br><span class="line"><span class="bullet">-</span> <span class="string">git</span> <span class="string">commit</span> <span class="bullet">-m</span> <span class="string">"Site updated:`date +"</span><span class="string">%Y-%m-%d</span> <span class="string">%H:%M:%S"`"</span></span><br><span class="line"><span class="comment"># push</span></span><br><span class="line"><span class="bullet">-</span> <span class="string">git</span> <span class="string">remote</span> <span class="string">add</span> <span class="string">coding</span> <span class="string">git@git.coding.net:USERNAME/USERNAME.git</span>  <span class="comment"># USERNAME为你的coding用户名</span></span><br><span class="line"><span class="bullet">-</span> <span class="string">git</span> <span class="string">remote</span> <span class="string">add</span> <span class="string">gitee</span> <span class="string">git@gitee.com:USERNAME/USERNAME.git</span>  <span class="comment"># USERNAME为你的gitee用户名</span></span><br><span class="line"><span class="bullet">-</span> <span class="string">git</span> <span class="string">push</span> <span class="bullet">-u</span> <span class="string">origin</span> <span class="string">master</span> <span class="bullet">-f</span></span><br><span class="line"><span class="bullet">-</span> <span class="string">git</span> <span class="string">push</span> <span class="bullet">-u</span> <span class="string">coding</span> <span class="string">master</span> <span class="bullet">-f</span></span><br><span class="line"><span class="bullet">-</span> <span class="string">git</span> <span class="string">push</span> <span class="bullet">-u</span> <span class="string">gitee</span> <span class="string">master</span> <span class="bullet">-f</span></span><br></pre>
                              </td>
                            </tr>
                          </table>
                        </figure>
                      </li>
                    </ul>
                    <img
                                                                                                    src="/posts/Hexo%20+%20NexT%20+%20Github%20Pages%20+%20Coding%20Pages%20+%20Gitee%20Pages%20+%20Travis%20全攻略/pic8.jpeg">
                    <h2 id="最后，将你的本地博客目录与远程github博客项目关联"><a href="#最后，将你的本地博客目录与远程github博客项目关联" class="headerlink"
                                                                                                      title="最后，将你的本地博客目录与远程github博客项目关联"></a>最后，将你的本地博客目录与远程github博客项目关联
                    </h2>
                    <ul>
                      <li>
                        <p>先初始化本地博客目录用git管理</p>
                        <figure class="highlight sh">
                          <table>
                            <tr>
                              <td class="gutter">
                                <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre>
                              </td>
                              <td class="code">
                                <pre><span class="line">git init</span><br><span class="line">git remote add origin git @github.com:USERNAME/USERNAME.github.io.git</span><br><span class="line">git checkout -b dev</span><br><span class="line">git add .</span><br><span class="line">git commit -m <span class="string">"first commit"</span></span><br><span class="line">git push -u origin dev</span><br></pre>
                              </td>
                            </tr>
                          </table>
                        </figure>
                      </li>
                      <li>
                        <p>上<a href="https://www.travis-ci.org/" target="_blank"
                                                                                                          rel="noopener">travis</a>检查构建流程，看看是否有问题，有问题再根据日志进行<code>.travis.yml</code>的修改
                        </p>
                      </li>
                      <li>
                        <p>构建完成后，分享到朋友圈:)</p>
                      </li>
                      <li>
                        <p>之后写完文章只要<code>git push origin
                            dev</code>就ok了。注意要在<code>dev</code>分支下进行。可以通过<code>git
                            checkout
                            dev</code>切换分支</p>
                      </li>
                    </ul>
                    <p>
                      从年初开始写，一直到今天（2018-05-23）才写完…足以证明我是一个多么<del>懒到没谱</del>持之以恒的人，这样的博主还不赶快献爱心一个？
                    </p>

                  </div>

                  <div>

                    <div>

                      <div
                                                                                                      style="text-align:center;color: #ccc;font-size:14px;">
                        ---------------------------------END---------------------------------
                      </div>

                    </div>

                  </div>

                  <div>
                    <div
                                                                                                    style="padding: 10px 0; margin: 20px auto; width: 90%; text-align: center;">
                      <div>手抖一下？</div>
                      <button id="rewardButton" disable="enable"
                                                                                                      onclick="var qr = document.getElementById('QR'); if (qr.style.display === 'none') {qr.style.display='block';} else {qr.style.display='none'}">
                        <span>献爱心</span>
                      </button>
                      <div id="QR" style="display: none;">

                        <div id="wechat" style="display: inline-block">
                          <img id="wechat_qr" src="/images/wx_pay1.png"
                                                                                                          alt="tankeryang WechatPay">
                          <p>WechatPay</p>
                        </div>

                      </div>
                    </div>

                  </div>

                  <footer class="post-footer">

                    <div class="post-tags">

                      <a href="/tags/Hexo/" rel="tag"><i class="fa fa-tag"></i>
                        Hexo</a>

                      <a href="/tags/NexT/" rel="tag"><i class="fa fa-tag"></i>
                        NexT</a>

                      <a href="/tags/Github-Pages/" rel="tag"><i
                                                                                                        class="fa fa-tag"></i>
                        Github Pages</a>

                      <a href="/tags/Coding-Pages/" rel="tag"><i
                                                                                                        class="fa fa-tag"></i>
                        Coding Pages</a>

                      <a href="/tags/Gitee-Pages/" rel="tag"><i
                                                                                                        class="fa fa-tag"></i>
                        Gitee Pages</a>

                      <a href="/tags/Travis/" rel="tag"><i
                                                                                                        class="fa fa-tag"></i>
                        Travis</a>

                    </div>

                    <div class="post-widgets">

                      <div id="needsharebutton-postbottom">
                        <span class="btn">
                          <i class="fa fa-share-alt" aria-hidden="true"></i>
                        </span>
                      </div>

                    </div>

                    <div class="post-nav">
                      <div class="post-nav-next post-nav-item">

                        <a href="/posts/半次元爬虫-banciyuan-downloader-v1-0 发布/" rel="next"
                                                                                                        title="半次元爬虫 banciyuan-downloader v1.0 发布">
                          <i class="fa fa-chevron-left"></i> 半次元爬虫
                          banciyuan-downloader v1.0 发布
                        </a>

                      </div>

                      <span class="post-nav-divider"></span>

                      <div class="post-nav-prev post-nav-item">

                        <a href="/posts/Machine-Learning (Week4)/" rel="prev"
                                                                                                        title="Machine Learning (Week4)">
                          Machine Learning (Week4) <i
                                                                                                          class="fa fa-chevron-right"></i>
                        </a>

                      </div>
                    </div>

                  </footer>
                </div>

              </article>

              <div class="post-spread">

                <!-- Go to www.addthis.com/dashboard to customize your tools -->
                <div class="addthis_inline_share_toolbox">
                  <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-59b14058bcac3b78"
                                                                                                  async="async">
                  </script>
                </div>

              </div>
            </div>

          </div>

          <div class="comments" id="comments">
          </div>

        </div>

        <div class="sidebar-toggle">
          <div class="sidebar-toggle-line-wrap">
            <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
            <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
            <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
          </div>
        </div>

        <aside id="sidebar" class="sidebar">

          <div id="sidebar-dimmer"></div>

          <div class="sidebar-inner">

            <ul class="sidebar-nav motion-element">
              <li class="sidebar-nav-toc sidebar-nav-active"
                                                                                              data-target="post-toc-wrap">
                文章目录
              </li>
              <li class="sidebar-nav-overview" data-target="site-overview-wrap">
                站点概览
              </li>
            </ul>

            <section class="site-overview-wrap sidebar-panel">
              <div class="site-overview">
                <div class="site-author motion-element" itemprop="author" itemscope
                                                                                                itemtype="http://schema.org/Person">

                  <a href="/" class="site-author-image" rel="start"
                                                                                                  style="border:none">
                    <img class="site-author-image" itemprop="image" src="/uploads/girl.jpeg"
                                                                                                    alt="tankeryang">
                  </a>

                  <p class="site-author-name" itemprop="name">tankeryang</p>
                  <p class="site-description motion-element"
                                                                                                  itemprop="description">
                    汝亦知射乎？吾射不亦精乎？</p>
                </div>

                <nav class="site-state motion-element">

                  <div class="site-state-item site-state-posts">

                    <a href="/archives/">

                      <span class="site-state-item-count">16</span>
                      <span class="site-state-item-name">日志</span>
                    </a>
                  </div>

                  <div class="site-state-item site-state-categories">
                    <a href="/categories/index.html">
                      <span class="site-state-item-count">7</span>
                      <span class="site-state-item-name">分类</span>
                    </a>
                  </div>

                  <div class="site-state-item site-state-tags">
                    <a href="/tags/index.html">
                      <span class="site-state-item-count">28</span>
                      <span class="site-state-item-name">标签</span>
                    </a>
                  </div>

                </nav>

                <div class="links-of-author motion-element">

                  <span class="links-of-author-item">
                    <a href="https://github.com/tankeryang" target="_blank"
                                                                                                    title="GitHub">

                      <i class="fa fa-fw fa-github"></i>GitHub</a>
                  </span>

                  <span class="links-of-author-item">
                    <a href="mailto:youngzyang@outlook.com" target="_blank"
                                                                                                    title="E-Mail">

                      <i class="fa fa-fw fa-envelope"></i>E-Mail</a>
                  </span>

                </div>

                <div class="cc-license motion-element" itemprop="license">
                  <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" class="cc-opacity"
                                                                                                  target="_blank">
                    <img src="/images/cc-by-nc-sa.svg" alt="Creative Commons">
                  </a>
                </div>

                <div
                                                                                                class="links-of-blogroll motion-element links-of-blogroll-block">
                  <div class="links-of-blogroll-title">
                    <i class="fa  fa-fw fa-link"></i>
                    博客镜像 & 友情链接
                  </div>
                  <ul class="links-of-blogroll-list">

                    <li class="links-of-blogroll-item">
                      <a href="https://tankeryang.github.io" title="淦 - github"
                                                                                                      target="_blank">淦
                        - github</a>
                    </li>

                    <li class="links-of-blogroll-item">
                      <a href="https://tankeryang.coding.me" title="淦 - coding"
                                                                                                      target="_blank">淦
                        - coding</a>
                    </li>

                    <li class="links-of-blogroll-item">
                      <a href="http://tankeryang.gitee.io" title="淦 - gitee"
                                                                                                      target="_blank">淦
                        - gitee</a>
                    </li>

                    <li class="links-of-blogroll-item">
                      <a href="https://deeeeeeeee.github.io" title="未知"
                                                                                                      target="_blank">未知</a>
                    </li>

                    <li class="links-of-blogroll-item">
                      <a href="https://www.tiexo.cn/" title="简单可依赖"
                                                                                                      target="_blank">简单可依赖</a>
                    </li>

                    <li class="links-of-blogroll-item">
                      <a href="https://darrenliuwei.com" title="刘伟"
                                                                                                      target="_blank">刘伟</a>
                    </li>

                  </ul>
                </div>

              </div>
            </section>

            <!--noindex-->
            <section
                                                                                            class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
              <div class="post-toc">

                <div class="post-toc-content">
                  <ol class="nav">
                    <li class="nav-item nav-level-1"><a class="nav-link"
                                                                                                      href="#安装Hexo"><span
                                                                                                        class="nav-number">1.</span>
                        <span class="nav-text">安装Hexo
                        </span></a>
                      <ol class="nav-child">
                        <li class="nav-item nav-level-2"><a class="nav-link"
                                                                                                          href="#安装node-js"><span
                                                                                                            class="nav-number">1.1.</span>
                            <span class="nav-text">安装node.js
                            </span></a></li>
                        <li class="nav-item nav-level-2"><a class="nav-link"
                                                                                                          href="#安装Git"><span
                                                                                                            class="nav-number">1.2.</span>
                            <span class="nav-text">安装Git</span></a></li>
                        <li class="nav-item nav-level-2"><a class="nav-link"
                                                                                                          href="#安装Hexo-1"><span
                                                                                                            class="nav-number">1.3.</span>
                            <span class="nav-text">安装Hexo
                            </span></a></li>
                      </ol>
                    </li>
                    <li class="nav-item nav-level-1"><a class="nav-link"
                                                                                                      href="#建站"><span
                                                                                                        class="nav-number">2.</span>
                        <span class="nav-text">建站</span></a>
                      <ol class="nav-child">
                        <li class="nav-item nav-level-2"><a class="nav-link"
                                                                                                          href="#建立本地博客文件夹"><span
                                                                                                            class="nav-number">2.1.</span>
                            <span class="nav-text">建立本地博客文件夹
                            </span></a></li>
                        <li class="nav-item nav-level-2"><a class="nav-link"
                                                                                                          href="#安装NexT主题"><span
                                                                                                            class="nav-number">2.2.</span>
                            <span class="nav-text">安装NexT主题
                            </span></a></li>
                        <li class="nav-item nav-level-2"><a class="nav-link"
                                                                                                          href="#启用NexT主题"><span
                                                                                                            class="nav-number">2.3.</span>
                            <span class="nav-text">启用NexT主题
                            </span></a></li>
                      </ol>
                    </li>
                    <li class="nav-item nav-level-1"><a class="nav-link"
                                                                                                      href="#配置博客配置文件"><span
                                                                                                        class="nav-number">3.</span>
                        <span class="nav-text">配置博客配置文件
                        </span></a>
                      <ol class="nav-child">
                        <li class="nav-item nav-level-2"><a class="nav-link"
                                                                                                          href="#博客基础配置"><span
                                                                                                            class="nav-number">3.1.</span>
                            <span class="nav-text">博客基础配置
                            </span></a></li>
                        <li class="nav-item nav-level-2"><a class="nav-link"
                                                                                                          href="#博客url配置"><span
                                                                                                            class="nav-number">3.2.</span>
                            <span class="nav-text">博客url配置
                            </span></a></li>
                        <li class="nav-item nav-level-2"><a class="nav-link"
                                                                                                          href="#配置资源文件夹"><span
                                                                                                            class="nav-number">3.3.</span>
                            <span class="nav-text">配置资源文件夹
                            </span></a></li>
                      </ol>
                    </li>
                    <li class="nav-item nav-level-1"><a class="nav-link"
                                                                                                      href="#写作"><span
                                                                                                        class="nav-number">4.</span>
                        <span class="nav-text">写作</span></a>
                      <ol class="nav-child">
                        <li class="nav-item nav-level-2"><a class="nav-link"
                                                                                                          href="#新建文章"><span
                                                                                                            class="nav-number">4.1.</span>
                            <span class="nav-text">新建文章</span></a>
                          <ol class="nav-child">
                            <li class="nav-item nav-level-3"><a class="nav-link"
                                                                                                              href="#布局"><span
                                                                                                                class="nav-number">4.1.1.</span>
                                <span class="nav-text">布局</span></a></li>
                            <li class="nav-item nav-level-3"><a class="nav-link"
                                                                                                              href="#文件名称"><span
                                                                                                                class="nav-number">4.1.2.</span>
                                <span class="nav-text">文件名称</span></a></li>
                            <li class="nav-item nav-level-3"><a class="nav-link"
                                                                                                              href="#下面，我们就来尝试一下吧！"><span
                                                                                                                class="nav-number">4.1.3.</span>
                                <span class="nav-text">下面，我们就来尝试一下吧！
                                </span></a></li>
                          </ol>
                        </li>
                        <li class="nav-item nav-level-2"><a class="nav-link"
                                                                                                          href="#标签插件"><span
                                                                                                            class="nav-number">4.2.</span>
                            <span class="nav-text">标签插件</span></a></li>
                      </ol>
                    </li>
                    <li class="nav-item nav-level-1"><a class="nav-link"
                                                                                                      href="#配置主题配置文件"><span
                                                                                                        class="nav-number">5.</span>
                        <span class="nav-text">配置主题配置文件
                        </span></a>
                      <ol class="nav-child">
                        <li class="nav-item nav-level-2"><a class="nav-link"
                                                                                                          href="#重要更新"><span
                                                                                                            class="nav-number">5.1.</span>
                            <span class="nav-text">重要更新</span></a></li>
                        <li class="nav-item nav-level-2"><a class="nav-link"
                                                                                                          href="#网站图标"><span
                                                                                                            class="nav-number">5.2.</span>
                            <span class="nav-text">网站图标</span></a></li>
                        <li class="nav-item nav-level-2"><a class="nav-link"
                                                                                                          href="#网站底部内容"><span
                                                                                                            class="nav-number">5.3.</span>
                            <span class="nav-text">网站底部内容
                            </span></a></li>
                        <li class="nav-item nav-level-2"><a class="nav-link"
                                                                                                          href="#菜单栏设置"><span
                                                                                                            class="nav-number">5.4.</span>
                            <span class="nav-text">菜单栏设置</span></a></li>
                        <li class="nav-item nav-level-2"><a class="nav-link"
                                                                                                          href="#主题布局"><span
                                                                                                            class="nav-number">5.5.</span>
                            <span class="nav-text">主题布局</span></a></li>
                        <li class="nav-item nav-level-2"><a class="nav-link"
                                                                                                          href="#侧边栏设置"><span
                                                                                                            class="nav-number">5.6.</span>
                            <span class="nav-text">侧边栏设置</span></a></li>
                        <li class="nav-item nav-level-2"><a class="nav-link"
                                                                                                          href="#个性化设置"><span
                                                                                                            class="nav-number">5.7.</span>
                            <span class="nav-text">个性化设置</span></a>
                          <ol class="nav-child">
                            <li class="nav-item nav-level-3"><a class="nav-link"
                                                                                                              href="#主题标签插件"><span
                                                                                                                class="nav-number">5.7.1.</span>
                                <span class="nav-text">主题标签插件
                                </span></a>
                              <ol class="nav-child">
                                <li class="nav-item nav-level-4"><a class="nav-link"
                                                                                                                  href="#note"><span
                                                                                                                    class="nav-number">5.7.1.1.</span>
                                    <span class="nav-text">note</span></a></li>
                                <li class="nav-item nav-level-4"><a class="nav-link"
                                                                                                                  href="#label"><span
                                                                                                                    class="nav-number">5.7.1.2.</span>
                                    <span class="nav-text">label</span></a></li>
                                <li class="nav-item nav-level-4"><a class="nav-link"
                                                                                                                  href="#选项卡"><span
                                                                                                                    class="nav-number">5.7.1.3.</span>
                                    <span class="nav-text">选项卡</span></a></li>
                              </ol>
                            </li>
                          </ol>
                        </li>
                      </ol>
                    </li>
                    <li class="nav-item nav-level-1"><a class="nav-link"
                                                                                                      href="#配置Git与Travic-CI持续集成"><span
                                                                                                        class="nav-number">6.</span>
                        <span class="nav-text">配置Git与Travic-CI持续集成
                        </span></a>
                      <ol class="nav-child">
                        <li class="nav-item nav-level-2"><a class="nav-link"
                                                                                                          href="#github，gitee，coding新建博客项目"><span
                                                                                                            class="nav-number">6.1.</span>
                            <span class="nav-text">github，gitee，coding新建博客项目
                            </span></a></li>
                        <li class="nav-item nav-level-2"><a class="nav-link"
                                                                                                          href="#添加-gitignore"><span
                                                                                                            class="nav-number">6.2.</span>
                            <span class="nav-text">添加.gitignore
                            </span></a></li>
                        <li class="nav-item nav-level-2"><a class="nav-link"
                                                                                                          href="#设置travis关联USERNAME-github-io"><span
                                                                                                            class="nav-number">6.3.</span>
                            <span class="nav-text">设置travis关联USERNAME.github.io
                            </span></a></li>
                        <li class="nav-item nav-level-2"><a class="nav-link"
                                                                                                          href="#为博客项目设置deploy-key"><span
                                                                                                            class="nav-number">6.4.</span>
                            <span class="nav-text">为博客项目设置deploy
                              key</span></a></li>
                        <li class="nav-item nav-level-2"><a class="nav-link"
                                                                                                          href="#加密travis-rsa"><span
                                                                                                            class="nav-number">6.5.</span>
                            <span class="nav-text">加密travis_rsa
                            </span></a></li>
                        <li class="nav-item nav-level-2"><a class="nav-link"
                                                                                                          href="#最后，将你的本地博客目录与远程github博客项目关联"><span
                                                                                                            class="nav-number">6.6.</span>
                            <span class="nav-text">最后，将你的本地博客目录与远程github博客项目关联
                            </span></a></li>
                      </ol>
                    </li>
                  </ol>
                </div>

              </div>
            </section>
            <!--/noindex-->

            <div class="back-to-top">
              <i class="fa fa-arrow-up"></i>

              <span id="scrollpercent"><span>0</span>%</span>

            </div>

          </div>
        </aside>

      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <hr>
        <div class="copyright">&copy; 2017 &mdash; <span
                                                                                          itemprop="copyrightYear">2019</span>
          <span class="with-love">
            <i class="fa fa-cog fa-spin fa-1x fa-fw"></i>
          </span>
          <span class="author" itemprop="copyrightHolder">tankeryang</span>

          <span class="post-meta-divider">|</span>
          <span class="post-meta-item-icon">
            <i class="fa fa-area-chart"></i>
          </span>

          <span title="total count">131k</span>

          <span class="post-meta-divider">|</span>
          <span class="post-meta-item-icon">
            <i class="fa fa-coffee"></i>
          </span>

          <span title="total time">4:51</span>

        </div>

        <div class="powered-by">Powered by — <a class="theme-link" target="_blank"
                                                                                          href="https://hexo.io">Hexo</a>
        </div>

        <span class="post-meta-divider">|</span>

        <div class="theme-info">theme &mdash; <a class="theme-link" target="_blank"
                                                                                          href="https://github.com/theme-next/hexo-theme-next">NexT.Mist</a>
          v6.0.1</div>

        <div class="busuanzi-count">
          <script async
                                                                                          src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js">
          </script>

          <span class="site-uv">
            <i class="fa fa-user"></i>
            <span class="busuanzi-value" id="busuanzi_value_site_uv"></span>
            visitors
          </span>

        </div>

      </div>
    </footer>

  </div>

  <script type="text/javascript">
    if (Object.prototype.toString.call(window.Promise) !==
      '[object Function]') {
      window.Promise = null;
    }

  </script>

  <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>

  <script type="text/javascript"
                                                                                  src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7">
  </script>

  <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1">
  </script>

  <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1">
  </script>

  <script type="text/javascript"
                                                                                  src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5">
  </script>

  <script type="text/javascript"
                                                                                  src="/lib/reading_progress/reading_progress.js">
  </script>

  <script type="text/javascript" src="/js/src/utils.js?v=6.0.1"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=6.0.1"></script>

  <script type="text/javascript" src="/js/src/scrollspy.js?v=6.0.1"></script>
  <script type="text/javascript" src="/js/src/post-details.js?v=6.0.1"></script>

  <script type="text/javascript" src="/js/src/bootstrap.js?v=6.0.1"></script>

  <script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
  <script src="//unpkg.com/valine/dist/Valine.min.js"></script>

  <script type="text/javascript">
    var GUEST = ['nick', 'mail', 'link'];
    var guest = 'nick,mail,link';
    guest = guest.split(',').filter(item => {
      return GUEST.indexOf(item) > -1;
    });
    new Valine({
      el: '#comments',
      verify: true,
      notify: false,
      appId: 'NiFbgAF3vRyR2BayGJOswb21-gzGzoHsz',
      appKey: 'xGF7qavyOOQGtVACk06SnLrW',
      placeholder: '填上邮箱可以收到回复的邮件提醒哦～',
      avatar: 'retro',
      guest_info: guest,
      pageSize: '10' || 10,
    });

  </script>

  <script type="text/javascript">
    // Popup Window;
    var isfetched = false;
    var isXml = true;
    // Search DB path;
    var search_path = "search.xml";
    if (search_path.length === 0) {
      search_path = "search.xml";
    } else if (/json$/i.test(search_path)) {
      isXml = false;
    }
    var path = "/" + search_path;
    // monitor main search box;
    var onPopupClose = function(e) {
      $('.popup').hide();
      $('#local-search-input').val('');
      $('.search-result-list').remove();
      $('#no-result').remove();
      $(".local-search-pop-overlay").remove();
      $('body').css('overflow', '');
    }

    function proceedsearch() {
      $("body")
        .append(
          '<div class="search-popup-overlay local-search-pop-overlay"></div>')
        .css('overflow', 'hidden');
      $('.search-popup-overlay').click(onPopupClose);
      $('.popup').toggle();
      var $localSearchInput = $('#local-search-input');
      $localSearchInput.attr("autocapitalize", "none");
      $localSearchInput.attr("autocorrect", "off");
      $localSearchInput.focus();
    }
    // search function;
    var searchFunc = function(path, search_id, content_id) {
      'use strict';
      // start loading animation
      $("body")
        .append(
          '<div class="search-popup-overlay local-search-pop-overlay">' +
          '<div id="search-loading-icon">' +
          '<i class="fa fa-spinner fa-pulse fa-5x fa-fw"></i>' +
          '</div>' +
          '</div>')
        .css('overflow', 'hidden');
      $("#search-loading-icon").css('margin', '20% auto 0 auto').css(
        'text-align', 'center');
      // ref: https://github.com/ForbesLindesay/unescape-html
      var unescapeHtml = function(html) {
        return String(html)
          .replace(/&quot;/g, '"')
          .replace(/&#39;/g, '\'')
          .replace(/&#x3A;/g, ':')
          // replace all the other &#x; chars
          .replace(/&#(\d+);/g, function(m, p) {
            return String.fromCharCode(p);
          })
          .replace(/&lt;/g, '<')
          .replace(/&gt;/g, '>')
          .replace(/&amp;/g, '&');
      };
      $.ajax({
        url: path,
        dataType: isXml ? "xml" : "json",
        async: true,
        success: function(res) {
          // get the contents from search data
          isfetched = true;
          $('.popup').detach().appendTo('.header-inner');
          var datas = isXml ? $("entry", res).map(function() {
            return {
              title: $("title", this).text(),
              content: $("content", this).text(),
              url: $("url", this).text()
            };
          }).get() : res;
          var input = document.getElementById(search_id);
          var resultContent = document.getElementById(content_id);
          var inputEventFunction = function() {
            var searchText = input.value.trim().toLowerCase();
            var keywords = searchText.split(/[\s\-]+/);
            if (keywords.length > 1) {
              keywords.push(searchText);
            }
            var resultItems = [];
            if (searchText.length > 0) {
              // perform local searching
              datas.forEach(function(data) {
                var isMatch = false;
                var hitCount = 0;
                var searchTextCount = 0;
                var title = data.title.trim();
                var titleInLowerCase = title.toLowerCase();
                var content = data.content.trim().replace(
                  /<[^>]+>/g, "");
                content = unescapeHtml(content);
                var contentInLowerCase = content.toLowerCase();
                var articleUrl = decodeURIComponent(data.url);
                var indexOfTitle = [];
                var indexOfContent = [];
                // only match articles with not empty titles
                if (title != '') {
                  keywords.forEach(function(keyword) {
                    function getIndexByWord(word, text,
                      caseSensitive) {
                      var wordLen = word.length;
                      if (wordLen === 0) {
                        return [];
                      }
                      var startPosition = 0,
                        position = [],
                        index = [];
                      if (!caseSensitive) {
                        text = text.toLowerCase();
                        word = word.toLowerCase();
                      }
                      while ((position = text.indexOf(word,
                          startPosition)) > -1) {
                        index.push({
                          position: position,
                          word: word
                        });
                        startPosition = position + wordLen;
                      }
                      return index;
                    }
                    indexOfTitle = indexOfTitle.concat(
                      getIndexByWord(keyword,
                        titleInLowerCase, false));
                    indexOfContent = indexOfContent.concat(
                      getIndexByWord(keyword,
                        contentInLowerCase, false));
                  });
                  if (indexOfTitle.length > 0 || indexOfContent
                    .length > 0) {
                    isMatch = true;
                    hitCount = indexOfTitle.length +
                      indexOfContent.length;
                  }
                }
                // show search results
                if (isMatch) {
                  // sort index by position of keyword
                  [indexOfTitle, indexOfContent].forEach(function(
                    index) {
                    index.sort(function(itemLeft, itemRight) {
                      if (itemRight.position !== itemLeft
                        .position) {
                        return itemRight.position -
                          itemLeft.position;
                      } else {
                        return itemLeft.word.length -
                          itemRight.word.length;
                      }
                    });
                  });
                  // merge hits into slices
                  function mergeIntoSlice(text, start, end,
                  index) {
                    var item = index[index.length - 1];
                    var position = item.position;
                    var word = item.word;
                    var hits = [];
                    var searchTextCountInSlice = 0;
                    while (position + word.length <= end && index
                      .length != 0) {
                      if (word === searchText) {
                        searchTextCountInSlice++;
                      }
                      hits.push({
                        position: position,
                        length: word.length
                      });
                      var wordEnd = position + word.length;
                      // move to next position of hit
                      index.pop();
                      while (index.length != 0) {
                        item = index[index.length - 1];
                        position = item.position;
                        word = item.word;
                        if (wordEnd > position) {
                          index.pop();
                        } else {
                          break;
                        }
                      }
                    }
                    searchTextCount += searchTextCountInSlice;
                    return {
                      hits: hits,
                      start: start,
                      end: end,
                      searchTextCount: searchTextCountInSlice
                    };
                  }
                  var slicesOfTitle = [];
                  if (indexOfTitle.length != 0) {
                    slicesOfTitle.push(mergeIntoSlice(title, 0,
                      title.length, indexOfTitle));
                  }
                  var slicesOfContent = [];
                  while (indexOfContent.length != 0) {
                    var item = indexOfContent[indexOfContent
                      .length - 1];
                    var position = item.position;
                    var word = item.word;
                    // cut out 100 characters
                    var start = position - 20;
                    var end = position + 80;
                    if (start < 0) {
                      start = 0;
                    }
                    if (end < position + word.length) {
                      end = position + word.length;
                    }
                    if (end > content.length) {
                      end = content.length;
                    }
                    slicesOfContent.push(mergeIntoSlice(content,
                      start, end, indexOfContent));
                  }
                  // sort slices in content by search text's count and hits' count
                  slicesOfContent.sort(function(sliceLeft,
                    sliceRight) {
                    if (sliceLeft.searchTextCount !==
                      sliceRight.searchTextCount) {
                      return sliceRight.searchTextCount -
                        sliceLeft.searchTextCount;
                    } else if (sliceLeft.hits.length !==
                      sliceRight.hits.length) {
                      return sliceRight.hits.length -
                        sliceLeft.hits.length;
                    } else {
                      return sliceLeft.start - sliceRight
                        .start;
                    }
                  });
                  // select top N slices in content
                  var upperBound = parseInt('-1');
                  if (upperBound >= 0) {
                    slicesOfContent = slicesOfContent.slice(0,
                      upperBound);
                  }
                  // highlight title and content
                  function highlightKeyword(text, slice) {
                    var result = '';
                    var prevEnd = slice.start;
                    slice.hits.forEach(function(hit) {
                      result += text.substring(prevEnd, hit
                        .position);
                      var end = hit.position + hit.length;
                      result += '<b class="search-keyword">' +
                        text.substring(hit.position, end) +
                        '</b>';
                      prevEnd = end;
                    });
                    result += text.substring(prevEnd, slice.end);
                    return result;
                  }
                  var resultItem = '';
                  if (slicesOfTitle.length != 0) {
                    resultItem += "<li><a href='" + articleUrl +
                      "' class='search-result-title'>" +
                      highlightKeyword(title, slicesOfTitle[0]) +
                      "</a>";
                  } else {
                    resultItem += "<li><a href='" + articleUrl +
                      "' class='search-result-title'>" + title +
                      "</a>";
                  }
                  slicesOfContent.forEach(function(slice) {
                    resultItem += "<a href='" + articleUrl +
                      "'>" +
                      "<p class=\"search-result\">" +
                      highlightKeyword(content, slice) +
                      "...</p>" + "</a>";
                  });
                  resultItem += "</li>";
                  resultItems.push({
                    item: resultItem,
                    searchTextCount: searchTextCount,
                    hitCount: hitCount,
                    id: resultItems.length
                  });
                }
              })
            };
            if (keywords.length === 1 && keywords[0] === "") {
              resultContent.innerHTML =
                '<div id="no-result"><i class="fa fa-search fa-5x" /></div>'
            } else if (resultItems.length === 0) {
              resultContent.innerHTML =
                '<div id="no-result"><i class="fa fa-frown-o fa-5x" /></div>'
            } else {
              resultItems.sort(function(resultLeft, resultRight) {
                if (resultLeft.searchTextCount !== resultRight
                  .searchTextCount) {
                  return resultRight.searchTextCount - resultLeft
                    .searchTextCount;
                } else if (resultLeft.hitCount !== resultRight
                  .hitCount) {
                  return resultRight.hitCount - resultLeft
                    .hitCount;
                } else {
                  return resultRight.id - resultLeft.id;
                }
              });
              var searchResultList =
                '<ul class=\"search-result-list\">';
              resultItems.forEach(function(result) {
                searchResultList += result.item;
              })
              searchResultList += "</ul>";
              resultContent.innerHTML = searchResultList;
            }
          }
          if ('auto' === 'auto') {
            input.addEventListener('input', inputEventFunction);
          } else {
            $('.search-icon').click(inputEventFunction);
            input.addEventListener('keypress', function(event) {
              if (event.keyCode === 13) {
                inputEventFunction();
              }
            });
          }
          // remove loading animation
          $(".local-search-pop-overlay").remove();
          $('body').css('overflow', '');
          proceedsearch();
        }
      });
    }
    // handle and trigger popup window;
    $('.popup-trigger').click(function(e) {
      e.stopPropagation();
      if (isfetched === false) {
        searchFunc(path, 'local-search-input', 'local-search-result');
      } else {
        proceedsearch();
      };
    });
    $('.popup-btn-close').click(onPopupClose);
    $('.popup').click(function(e) {
      e.stopPropagation();
    });
    $(document).on('keyup', function(event) {
      var shouldDismissSearchPopup = event.which === 27 &&
        $('.search-popup').is(':visible');
      if (shouldDismissSearchPopup) {
        onPopupClose();
      }
    });

  </script>

  <script src="https://cdn1.lncld.net/static/js/av-core-mini-0.6.4.js"></script>
  <script>
    AV.initialize("NiFbgAF3vRyR2BayGJOswb21-gzGzoHsz",
      "xGF7qavyOOQGtVACk06SnLrW");

  </script>
  <script>
    function showTime(Counter) {
      var query = new AV.Query(Counter);
      var entries = [];
      var $visitors = $(".leancloud_visitors");
      $visitors.each(function() {
        entries.push($(this).attr("id").trim());
      });
      query.containedIn('url', entries);
      query.find()
        .done(function(results) {
          var COUNT_CONTAINER_REF = '.leancloud-visitors-count';
          if (results.length === 0) {
            $visitors.find(COUNT_CONTAINER_REF).text(0);
            return;
          }
          for (var i = 0; i < results.length; i++) {
            var item = results[i];
            var url = item.get('url');
            var time = item.get('time');
            var element = document.getElementById(url);
            $(element).find(COUNT_CONTAINER_REF).text(time);
          }
          for (var i = 0; i < entries.length; i++) {
            var url = entries[i];
            var element = document.getElementById(url);
            var countSpan = $(element).find(COUNT_CONTAINER_REF);
            if (countSpan.text() == '') {
              countSpan.text(0);
            }
          }
        })
        .fail(function(object, error) {
          console.log("Error: " + error.code + " " + error.message);
        });
    }

    function addCount(Counter) {
      var $visitors = $(".leancloud_visitors");
      var url = $visitors.attr('id').trim();
      var title = $visitors.attr('data-flag-title').trim();
      var query = new AV.Query(Counter);
      query.equalTo("url", url);
      query.find({
        success: function(results) {
          if (results.length > 0) {
            var counter = results[0];
            counter.fetchWhenSave(true);
            counter.increment("time");
            counter.save(null, {
              success: function(counter) {
                var $element = $(document.getElementById(url));
                $element.find('.leancloud-visitors-count').text(
                  counter.get('time'));
              },
              error: function(counter, error) {
                console.log(
                  'Failed to save Visitor num, with error message: ' +
                  error.message);
              }
            });
          } else {
            var newcounter = new Counter();
            /* Set ACL */
            var acl = new AV.ACL();
            acl.setPublicReadAccess(true);
            acl.setPublicWriteAccess(true);
            newcounter.setACL(acl);
            /* End Set ACL */
            newcounter.set("title", title);
            newcounter.set("url", url);
            newcounter.set("time", 1);
            newcounter.save(null, {
              success: function(newcounter) {
                var $element = $(document.getElementById(url));
                $element.find('.leancloud-visitors-count').text(
                  newcounter.get('time'));
              },
              error: function(newcounter, error) {
                console.log('Failed to create');
              }
            });
          }
        },
        error: function(error) {
          console.log('Error:' + error.code + " " + error.message);
        }
      });
    }
    $(function() {
      var Counter = AV.Object.extend("Counter");
      if ($('.leancloud_visitors').length == 1) {
        addCount(Counter);
      } else if ($('.post-title-link').length > 1) {
        showTime(Counter);
      }
    });

  </script>

  <script src="/lib/needsharebutton/needsharebutton.js"></script>

  <script>
    pbOptions = {};
    pbOptions.iconStyle = "box";
    pbOptions.boxForm = "horizontal";
    pbOptions.position = "topCenter";
    pbOptions.networks = "Weibo,Wechat,Douban,QQZone,Twitter,Facebook";
    new needShareButton('#needsharebutton-postbottom', pbOptions);

  </script>

  <script src="/lib/pangu/dist/pangu.min.js?v=3.3"></script>
  <script type="text/javascript">
    pangu.spacingPage();

  </script>

  <script type="text/javascript" src="/js/src/exturl.js?v=6.0.1"></script><!-- hexo-inject:begin --><!-- Begin: Injected MathJax -->
<script type="text/x-mathjax-config">
  MathJax.Hub.Config("");
</script>

<script type="text/x-mathjax-config">
  MathJax.Hub.Queue(function() {
    var all = MathJax.Hub.getAllJax(), i;
    for(i=0; i < all.length; i += 1) {
      all[i].SourceElement().parentNode.className += ' has-jax';
    }
  });
</script>

<script type="text/javascript" src="custom_mathjax_source">
</script>
<!-- End: Injected MathJax -->
<!-- hexo-inject:end -->

</body>

</html>
